@@ -37,6 +37,7 @@ spec:css2; type:property; text:padding-bottom
37
37
spec:css2; type:property; text:padding-top
38
38
spec:css2; type:property; text:padding-left
39
39
spec:css2; type:property; text:padding-right
40
+ spec:css-borders-4; type:property; text:border-color
40
41
spec:css-borders-4; type:property; text:border-right
41
42
spec:css-borders-4; type:property; text:border-left
42
43
spec:css-borders-4; type:property; text:border-top
@@ -817,31 +818,24 @@ permission {
817
818
Additionally, some rules apply based on conditions not easily expressible as
818
819
CSS.
819
820
820
- If 'height' is `auto`, then apply:
821
-
822
- <pre class="highlight lang-css">
823
- @namespace "http://www.w3.org/1999/xhtml";
824
- permission {
825
- padding-top: clamp(1em, computed, none);
826
- padding-bottom: calc(padding-top);
827
- }
828
- </pre>
829
-
830
- If 'width' is `auto`, then apply:
831
-
832
- <pre class="highlight lang-css">
833
- @namespace "http://www.w3.org/1999/xhtml";
834
- permission {
835
- padding-left: clamp(none, computed, 5em);
836
- padding-right: calc(padding-left);
837
- }
838
- </pre>
839
-
840
- Apply the following sheet, if the element does not have all of the following:
841
-
842
- - A border width of at least `1px`,
843
- - a color to background-color contrast ratio of at least 3,
844
- - and alpha of 1.
821
+ The limits on 'width' and 'padding-left' take multiple conditions into account.
822
+ We distinguish between whether the element has an "obvious" border, and will
823
+ place additional restrictions on it if not. The border is considered "obvious"
824
+ if:
825
+
826
+ * 'border-bottom' , 'border-top' , 'border-left' , and 'border-right' are all
827
+ at least 1px,
828
+ * 'border-color' is opaque,
829
+ * the contrast ratio of 'border-color' and the element's 'color' is at least 3.
830
+
831
+ * If the border is "obvious" and 'width' is [=auto=] ,
832
+ * then do nothing.
833
+ * If the border is "obvious" and 'width' is not 'width/auto' ,
834
+ * then set 'padding-left' to `0`.
835
+ * If the border is not "obvious" and 'width' is [=auto=] ,
836
+ * then set 'padding-left' to `clam(none, computed, 5em)`.
837
+ * If the border is no "obvious" and 'width' is not [=auto=] ,
838
+ * then set 'padding-left' to `0`.
845
839
846
840
<pre class="highlight lang-css">
847
841
@namespace "http://www.w3.org/1999/xhtml";
0 commit comments