From 1be8116e16b6034a0a281153f119fbab386703dd Mon Sep 17 00:00:00 2001 From: Daniel Vogelheim Date: Tue, 15 Apr 2025 19:01:55 +0200 Subject: [PATCH 1/3] font-size --- permission-element.bs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/permission-element.bs b/permission-element.bs index cbedbd0..7ebcd65 100644 --- a/permission-element.bs +++ b/permission-element.bs @@ -754,13 +754,14 @@ If one of these conditions is not met, then a Alpha has to be 1. 'font-size': - If [=specified value=] is expressed as <relative-size>: + The 'font-size' is limited as follows: From cf8088a07585b1401e0ff08d69b95b77e8697aa8 Mon Sep 17 00:00:00 2001 From: Daniel Vogelheim Date: Tue, 15 Apr 2025 19:18:55 +0200 Subject: [PATCH 2/3] Use calc-size --- permission-element.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/permission-element.bs b/permission-element.bs index 7ebcd65..a249502 100644 --- a/permission-element.bs +++ b/permission-element.bs @@ -804,7 +804,7 @@ permission { min-height: clamp(1em, computed, none); max-height: clamp(none, computed, 3em); - min-width: clamp(none, computed, calc(fit-content)); + min-width: clamp(none, computed, calc-size(fit-content, size)); border-width: clamp(none, computed, 1em); @@ -846,7 +846,7 @@ Apply the following sheet, if the element does not have all of the following:
 @namespace "http://www.w3.org/1999/xhtml";
 permission {
-  max-width: clamp(none, computed, calc(3 * fit-content));
+  max-width: clamp(none, computed, calc-size(fit-content, 3 * size));
 }
 
From 25b6efaf03b70ea9009e4a3fe3e7c92ad9de52a2 Mon Sep 17 00:00:00 2001 From: Daniel Vogelheim Date: Wed, 16 Apr 2025 13:52:50 +0200 Subject: [PATCH 3/3] width and padding --- permission-element.bs | 44 +++++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/permission-element.bs b/permission-element.bs index a249502..5b00ec7 100644 --- a/permission-element.bs +++ b/permission-element.bs @@ -37,6 +37,7 @@ spec:css2; type:property; text:padding-bottom spec:css2; type:property; text:padding-top spec:css2; type:property; text:padding-left spec:css2; type:property; text:padding-right +spec:css-borders-4; type:property; text:border-color spec:css-borders-4; type:property; text:border-right spec:css-borders-4; type:property; text:border-left spec:css-borders-4; type:property; text:border-top @@ -817,31 +818,24 @@ permission { Additionally, some rules apply based on conditions not easily expressible as CSS. -If 'height' is `auto`, then apply: - -
-@namespace "http://www.w3.org/1999/xhtml";
-permission {
-  padding-top: clamp(1em, computed, none);
-  padding-bottom: calc(padding-top);
-}
-
- -If 'width' is `auto`, then apply: - -
-@namespace "http://www.w3.org/1999/xhtml";
-permission {
-  padding-left: clamp(none, computed, 5em);
-  padding-right: calc(padding-left);
-}
-
- -Apply the following sheet, if the element does not have all of the following: - -- A border width of at least `1px`, -- a color to background-color contrast ratio of at least 3, -- and alpha of 1. +The limits on 'width' and 'padding-left' take multiple conditions into account. +We distinguish between whether the element has an "obvious" border, and will +place additional restrictions on it if not. The border is considered "obvious" +if: + +* 'border-bottom', 'border-top', 'border-left', and 'border-right' are all + at least 1px, +* 'border-color' is opaque, +* the contrast ratio of 'border-color' and the element's 'color' is at least 3. + +* If the border is "obvious" and 'width' is [=auto=], + * then do nothing. +* If the border is "obvious" and 'width' is not 'width/auto', + * then set 'padding-left' to `0`. +* If the border is not "obvious" and 'width' is [=auto=], + * then set 'padding-left' to `clam(none, computed, 5em)`. +* If the border is no "obvious" and 'width' is not [=auto=], + * then set 'padding-left' to `0`.
 @namespace "http://www.w3.org/1999/xhtml";