You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p> If an <aclass=cssdata-link-type=maybehref=#at-ruledef-import>@import</a> rule refers to a valid stylesheet,
161
+
user agents must treat the contents of the stylesheet as if they were written in place of the <aclass=cssdata-link-type=maybehref=#at-ruledef-import>@import</a> rule.
162
+
163
+
<pclass=example>
164
+
For example, declarations in style rules from imported stylesheets interact with the cascade
165
+
as if they were written literally into the stylesheet at the point of the <aclass=cssdata-link-type=maybehref=#at-ruledef-import>@import</a>.
166
+
Similarly, style rules in a stylesheet imported into a scoped stylesheet
167
+
are scoped in the same way.
168
+
160
169
<p>
161
170
So that user agents can avoid retrieving resources for unsupported media types,
162
171
authors may specify media-dependent <aclass=cssdata-link-type=maybehref=#at-ruledef-import>@import</a> rules.
(Note that these keywords cannot be combined with other values in a single declaration, not even in a shorthand.)
271
280
272
281
<p>
273
-
Declaring a <ahref=#shorthand-properties>shorthand</a> property to be <aclass=cssdata-link-type=maybehref=#valuedef-important>!important</a>
274
-
is equivalent to declaring all of its <ahref=#longhand-sub-properties>sub-properties</a> to be <aclass=cssdata-link-type=maybehref=#valuedef-important>!important</a>.
282
+
Declaring a <ahref=#shorthand-properties>shorthand</a> property to be <aclass=cssdata-link-type=maybehref=#important>!important</a>
283
+
is equivalent to declaring all of its <ahref=#longhand-sub-properties>sub-properties</a> to be <aclass=cssdata-link-type=maybehref=#important>!important</a>.
The <ahref=#origin>origin</a> of a declaration is based on where it comes from
689
-
and its <ahref=#importanttitle=important>importance</a> is whether or not it is declared <aclass=cssdata-link-type=maybehref=#valuedef-important>!important</a> (see below).
698
+
and its <ahref=#important0title=important>importance</a> is whether or not it is declared <aclass=cssdata-link-type=maybehref=#important>!important</a> (see below).
690
699
The precedence of the various <ahref=#origin>origins</a> is, in descending order:
691
700
692
701
<ol>
@@ -817,27 +826,27 @@ <h3 data-level=6.1 id=cascading-origins><span class=secno>6.1 </span><span class
Important Declarations: the <aclass=cssdata-link-type=maybehref=#valuedef-important>!important</a> annotation</span><aclass=section-linkhref=#importance>§</a></h3>
829
+
Important Declarations: the <aclass=cssdata-link-type=maybehref=#important>!important</a> annotation</span><aclass=section-linkhref=#importance>§</a></h3>
821
830
822
831
<p>
823
832
CSS attempts to create a balance of power between author and user style sheets.
824
833
By default, rules in an author's style sheet override those in a user's style sheet,
825
834
which override those in the user-agent's default style sheet.
826
-
To balance this, a declaration can be made <dfndata-dfn-type=dfnid=important>important</dfn>,
835
+
To balance this, a declaration can be made <dfndata-dfn-type=dfnid=important0>important</dfn>,
827
836
which increases its weight in the cascade and inverts the order of precedence.
828
837
829
838
<p>
830
-
A declaration is <ahref=#important>important</a> if it has a <dfndata-dfn-type=valueid=valuedef-important><aclass=cssdata-link-type=maybehref=#valuedef-important>!important</a></dfn> annotation,
839
+
A declaration is <ahref=#important0>important</a> if it has a <dfndata-dfn-type=dfnid=important>!important</dfn> annotation,
831
840
i.e. if the last two (non-whitespace, non-comment) tokens
832
-
in its value are the delimiter token <spanclass=cssdata-link-type=maybe>!</span> followed by the identifier token <aclass=cssdata-link-type=maybehref=#important>important</a>.
841
+
in its value are the delimiter token <spanclass=cssdata-link-type=maybe>!</span> followed by the identifier token <aclass=cssdata-link-type=maybehref=#important0>important</a>.
An <ahref=#important>important</a> declaration takes precedence over a normal declaration.
839
-
Author and user style sheets may contain <aclass=cssdata-link-type=maybehref=#valuedef-important>!important</a> declarations,
840
-
with user <aclass=cssdata-link-type=maybehref=#valuedef-important>!important</a> declarations overriding author <aclass=cssdata-link-type=maybehref=#valuedef-important>!important</a> declarations.
847
+
An <ahref=#important0>important</a> declaration takes precedence over a normal declaration.
848
+
Author and user style sheets may contain <aclass=cssdata-link-type=maybehref=#important>!important</a> declarations,
849
+
with user <aclass=cssdata-link-type=maybehref=#important>!important</a> declarations overriding author <aclass=cssdata-link-type=maybehref=#important>!important</a> declarations.
841
850
This CSS feature improves accessibility of documents by giving users with special requirements
User agent style sheets may also contain <aclass=cssdata-link-type=maybehref=#valuedef-important>!important</a> declarations.
861
+
User agent style sheets may also contain <aclass=cssdata-link-type=maybehref=#important>!important</a> declarations.
853
862
These override all author and user declarations.
854
863
855
864
<divclass=example>
856
865
<p>
857
-
The first rule in the user's style sheet in the following example contains an <aclass=cssdata-link-type=maybehref=#valuedef-important>!important</a> declaration,
866
+
The first rule in the user's style sheet in the following example contains an <aclass=cssdata-link-type=maybehref=#important>!important</a> declaration,
858
867
which overrides the corresponding declaration in the author's style sheet.
859
-
The declaration in the second rule will also win due to being marked <aclass=cssdata-link-type=maybehref=#valuedef-important>!important</a>.
860
-
However, the third declaration in the user's style sheet is not <aclass=cssdata-link-type=maybehref=#valuedef-important>!important</a>
868
+
The declaration in the second rule will also win due to being marked <aclass=cssdata-link-type=maybehref=#important>!important</a>.
869
+
However, the third declaration in the user's style sheet is not <aclass=cssdata-link-type=maybehref=#important>!important</a>
861
870
and will therefore lose to the second rule in the author's style sheet
862
871
(which happens to set style on a <ahref=#shorthand-properties>shorthand</a> property).
863
-
Also, the third author rule will lose to the second author rule since the second declaration is <aclass=cssdata-link-type=maybehref=#valuedef-important>!important</a>.
864
-
This shows that <aclass=cssdata-link-type=maybehref=#valuedef-important>!important</a> declarations have a function also within author style sheets.
872
+
Also, the third author rule will lose to the second author rule since the second declaration is <aclass=cssdata-link-type=maybehref=#important>!important</a>.
873
+
This shows that <aclass=cssdata-link-type=maybehref=#important>!important</a> declarations have a function also within author style sheets.
Resetting a Property: the <aclass=cssdata-link-type=maybehref=#valuedef-initial>initial</a> keyword</span><aclass=section-linkhref=#initial>§</a></h4>
956
965
957
966
<p>
958
-
If the <ahref=#cascaded-value>cascaded value</a> is the <dfndata-dfn-type=valueid=valuedef-initial><aclass=cssdata-link-type=maybehref=#valuedef-initial>initial</a></dfn> keyword,
967
+
If the <ahref=#cascaded-value>cascaded value</a> is the <dfndata-dfn-for=alldata-dfn-type=valueid=valuedef-initial><aclass=cssdata-link-type=maybehref=#valuedef-initial>initial</a></dfn> keyword,
959
968
the property's <ahref=#initial-value>initial value</a> becomes its <ahref=#specified-value>specified value</a>.
Explicit Inheritance: the <aclass=cssdata-link-type=maybehref=#valuedef-inherit>inherit</a> keyword</span><aclass=section-linkhref=#inherit>§</a></h4>
963
972
964
973
<p>
965
-
If the <ahref=#cascaded-value>cascaded value</a> of a property is the <dfndata-dfn-type=valueid=valuedef-inherit><aclass=cssdata-link-type=maybehref=#valuedef-inherit>inherit</a></dfn> keyword,
974
+
If the <ahref=#cascaded-value>cascaded value</a> of a property is the <dfndata-dfn-for=alldata-dfn-type=valueid=valuedef-inherit><aclass=cssdata-link-type=maybehref=#valuedef-inherit>inherit</a></dfn> keyword,
966
975
the <ahref=#inherited-value>inherited value</a> becomes the property's <ahref=#specified-valuetitle="specified value">specified</a> and <ahref=#computed-value>computed values</a>.
Erasing All Declarations: the <aclass=cssdata-link-type=maybehref=#valuedef-unset>unset</a> keyword</span><aclass=section-linkhref=#inherit-initial>§</a></h4>
970
979
971
980
<p>
972
-
If the <ahref=#cascaded-value>cascaded value</a> of a property is the <dfndata-dfn-type=valueid=valuedef-unset><aclass=cssdata-link-type=maybehref=#valuedef-unset>unset</a></dfn> keyword,
981
+
If the <ahref=#cascaded-value>cascaded value</a> of a property is the <dfndata-dfn-for=alldata-dfn-type=valueid=valuedef-unset><aclass=cssdata-link-type=maybehref=#valuedef-unset>unset</a></dfn> keyword,
973
982
then if it is an inherited property, this is treated as <aclass=cssdata-link-type=maybehref=#valuedef-inherit>inherit</a>,
974
983
and if it is not, this is treated as <aclass=cssdata-link-type=maybehref=#valuedef-initial>initial</a>.
975
984
This keyword effectively erases all <ahref=#declared-value>declared values</a> occurring earlier in the <ahref=#cascade>cascade</a>,
<li>Dropped the <spanclass=cssdata-link-type=maybe>default</span> keyword.
990
999
<li>Added the <aclass=cssdata-link-type=maybehref=#valuedef-unset>unset</a> keyword.
991
-
<li>Excluded <aclass=propertydata-link-type=propdeschref=http://www.w3.org/TR/css3-writing-modes/#unicode-bidi0title=unicode-bidi>unicode-bidi</a> and <aclass=propertydata-link-type=propdeschref=http://www.w3.org/TR/css3-writing-modes/#direction0title=direction>direction</a> from the <aclass=propertydata-link-type=propdeschref=#alltitle=all>all</a> shorthand.
1000
+
<li>Excluded <aclass=propertydata-link-type=propdeschref=http://www.w3.org/TR/css3-writing-modes/#unicode-bidi0title=unicode-bidi>unicode-bidi</a> and <aclass=propertydata-link-type=propdeschref=http://www.w3.org/TR/css3-writing-modes/#direction0title=direction>direction</a> from the <aclass=propertydata-link-type=propdeschref=#propdef-alltitle=all>all</a> shorthand.
0 commit comments