mirror of
https://github.com/black7375/Firefox-UI-Fix.git
synced 2025-12-15 15:20:33 -08:00
Doc: Separated Restrictions
This commit is contained in:
parent
6646b4a4ae
commit
a5a215ec45
2 changed files with 21 additions and 18 deletions
|
|
@ -135,24 +135,7 @@ Refer to [Project\_Structure.md](./docs/Project_Structure.md).
|
|||
|
||||
### Restrictions
|
||||
|
||||
- Cross Platform
|
||||
- Different compatibility issues occur in Win7, Win8, Win10, KDE, Gnome, Mac, etc.
|
||||
- Consider compatibility as much as possible, but use [dedicated media queries](https://github.com/mozilla/gecko-dev/blob/d6188c9ce02efeea309e7177fc14c9eb2f09db37/servo/components/style/gecko/media_features.rs#L906-L930) in special cases
|
||||
- CSS Loading Order
|
||||
- User CSS(`userChrome.css`, `userContent.css`) is usually loaded first.
|
||||
- In many cases, overriding should be prevented with [`important!`](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity#the_!important_exception)(Anti-pattern in general web), and side effects should also be considered.
|
||||
- DOM structure cannot be modified
|
||||
- It is possible with JS, but there are security and configuration issues, so we should make the most of CSS.
|
||||
- [`::before`](https://developer.mozilla.org/en-US/docs/Web/CSS/::before) and [`::after`](https://developer.mozilla.org/en-US/docs/Web/CSS/::after) can indirectly add CSS elements.
|
||||
- [Shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM)
|
||||
- Firefox actively uses shadow dom internally
|
||||
- To modify, it is often a roundabout approach or impossible to inherit
|
||||
- [XUL](https://en.wikipedia.org/wiki/XUL)
|
||||
- Sometimes written and bound in C++ for performance, like a treeview of bookmarks.
|
||||
- The proper document does not exist, so we have to read the source code and work
|
||||
- Available CSS features are also restricted.
|
||||
- Side Effects
|
||||
- Only CSS modifications can cause bugs that are hard to think of in the general web, such as the [context menu not appearing](https://github.com/black7375/Firefox-UI-Fix/issues/114).
|
||||
Refer to [Restrictions.md](./docs/Restrictions.md).
|
||||
|
||||
## Rules
|
||||
|
||||
|
|
|
|||
20
docs/Restrictions.md
Normal file
20
docs/Restrictions.md
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# Restrictions
|
||||
|
||||
- Cross Platform
|
||||
- Different compatibility issues occur in Win7, Win8, Win10, KDE, Gnome, Mac, etc.
|
||||
- Consider compatibility as much as possible, but use [dedicated media queries](https://github.com/mozilla/gecko-dev/blob/d6188c9ce02efeea309e7177fc14c9eb2f09db37/servo/components/style/gecko/media_features.rs#L906-L930) in special cases
|
||||
- CSS Loading Order
|
||||
- User CSS(`userChrome.css`, `userContent.css`) is usually loaded first.
|
||||
- In many cases, overriding should be prevented with [`important!`](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity#the_!important_exception)(Anti-pattern in general web), and side effects should also be considered.
|
||||
- DOM structure cannot be modified
|
||||
- It is possible with JS, but there are security and configuration issues, so we should make the most of CSS.
|
||||
- [`::before`](https://developer.mozilla.org/en-US/docs/Web/CSS/::before) and [`::after`](https://developer.mozilla.org/en-US/docs/Web/CSS/::after) can indirectly add CSS elements.
|
||||
- [Shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM)
|
||||
- Firefox actively uses shadow dom internally
|
||||
- To modify, it is often a roundabout approach or impossible to inherit
|
||||
- [XUL](https://en.wikipedia.org/wiki/XUL)
|
||||
- Sometimes written and bound in C++ for performance, like a treeview of bookmarks.
|
||||
- The proper document does not exist, so we have to read the source code and work
|
||||
- Available CSS features are also restricted.
|
||||
- Side Effects
|
||||
- Only CSS modifications can cause bugs that are hard to think of in the general web, such as the [context menu not appearing](https://github.com/black7375/Firefox-UI-Fix/issues/114).
|
||||
Loading…
Add table
Add a link
Reference in a new issue