Skip to content

Commit 6424851

Browse files
committed
[css-shadow-parts-1] Expand motivation, remove "for obvious reasons. Fixes #2099
1 parent 3317dcc commit 6424851

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

css-shadow-parts-1/Overview.bs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,16 @@ without surrending all control.
5050
Motivation {#motivation}
5151
------------------------
5252

53-
For obvious reasons,
54-
it's valuable to let the outside page style the internals of a shadow tree,
55-
at least in some limited ways.
56-
(The ubiquity of UA-specific pseudo-elements for the various input elements shows this.)
57-
58-
The previous proposed method for doing so,
53+
For custom elements to be fully useful and as capable as built-in elements
54+
it should be possible for parts of them to be styled from outside.
55+
Exactly what can be styled from outside should be controlled by the element author.
56+
Also, it should be possible for a custom element to present a stable "API" for styling.
57+
That is, the selector used to style a part of a custom element
58+
should not expose or require knowledge of the internal details of the element.
59+
The custom element author should be able to change the internal details of the element
60+
while leaving the selectors untouched.
61+
62+
The previous proposed method for styling inside the shadow tree,
5963
the >>> combinator,
6064
turned out to be <em>too powerful</em> for its own good;
6165
it exposed too much of a component's internal structure to scrutiny,

0 commit comments

Comments
 (0)