diff --git a/permission-element.bs b/permission-element.bs index 7f2837f..bd83bc0 100644 --- a/permission-element.bs +++ b/permission-element.bs @@ -19,8 +19,21 @@ Abstract: A `` HTML element to request browser permissions in-page. -Additionally, a <{permission}> element puts contraints on a number of additional styles: +Additionally, a <{permission}> element puts contraints on a number of +additional styles. If one of these conditions is not met, then a +[=add a temporary blocker|temporary blocker is added=] with type +{{PermissionElementBlockerReason/style_invalid}}. + +
+'color', 'background-color':
+  Set by default to the user agent's default `button` colors.
+  The [=contrast ratio=] between the 2 colors needs to be at least 3.
+  Alpha has to be 1.
+
+'font-size':
+  Must be set larger or equal than ''font-size/small'' and less than or equal
+  to ''font-size/xx-large''.
+
+ +ISSUE: font-size: Explainer says, "Zoom will be taken into account when computing font-size." I have no idea what that means with absolute font sizes. + +The following conditions on the style are resolved by modifying the style:
-color, background-color: Set by default to the user agent's default `button` colors. The user agent should consider accessibility guidelines for sufficient contrast, for example the WCAG AA 4.5:1 formula to ensure text is legible.
-box-shadow: Not allowed if it contains ‘inset' as it can be used to cover the background and therefore affect contrast.
-font: Care should be taken to ensure the font used is easily legible (e.g. not any dingbat font). The user agent should either hard set the font value without allowing override, or should maintain a curated list of allowed fonts.
-font-size: Needs to be large enough to ensure the font is legible.
-width, min-width, max-width: The user agent should ensure the PEPC width is sufficient to not let contents overflow. This requires computing the text size (based on font) programmatically and potentially adding the icon width if present.
-height, min-height, max-height: The user agent should ensure the PEPC height is sufficient to not let contents overflow. Intuitively this means the height should never be allowed to be smaller than 1em.
-cursor: Only keyword values are allowed. That is, only predefined cursors and no custom cursors are allowed. Other values have no effect.
+'margin', and any margin-* properties:
+  Values under `4px` will be corrected to `4px`.
+  This is done to help prevent false positives for the logic that detects the
+  element being covered by something else.
+
+'font-style':
+  Defaults to ''font-style/normal''. If values other than
+  ''font-style/normal'' or ''font-style/italic'' are specified,
+  the default will be used instead.
+
+'display':
+  Defaults to ''display/inline-block''. If values other than
+  ''display/inline-block'' or ''display/none'' are specified, the default will
+  be used again.
+
+'min-width':
+  Defaults to ''width/fit-content''. If a value exists, the <> of
+  ''width/fit-content'' and the computed value is used.
+
+'max-width':
+  Defaults to 3 * ''width/fit-content''.
+  If a value exists, <> between the default and the inherited value
+  will be used. However this does not apply if the element has a border with
+  a width of at least 1px and a color that has a contrast ratio with the
+  background-color of at least 3 and alpha of 1.
+
+'padding-top':
+  If 'height' is `auto`, use 'padding-top': clamp(1em, inherit, none); 'padding-bottom': calc(padding-top);
+  Otherwise, ignore.
+
+'padding-left':
+  If 'width' is `auto`, use 'padding-left': clamp(none, inherit, 5em); 'padding-right': calc(padding-left);
+  Otherwise, ...
+
 
+ +ISSUE: Why the complicated 'max-width' rule? + +ISSUE: 'padding-left' description said: _Otherwise, This does not apply under the same border conditions as 'max-width', except 'padding-right' with still be set to the value of 'padding-left'._ I can't parse that. + + # Security & Privacy Considerations # {#secpriv}