WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
79075
<style scoped>: Add @global rules
https://bugs.webkit.org/show_bug.cgi?id=79075
Summary
<style scoped>: Add @global rules
Roland Steiner
Reported
2012-02-20 21:30:14 PST
Add @global rules to allow scoped style rules to "react" to the surrounding context (see HTML5 spec)
Attachments
work-in-progress
(42.76 KB, patch)
2012-03-07 05:31 PST
,
Roland Steiner
no flags
Details
Formatted Diff
Diff
Patch
(100.71 KB, patch)
2012-03-09 01:13 PST
,
Roland Steiner
koivisto
: review-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Roland Steiner
Comment 1
2012-03-07 05:31:35 PST
Created
attachment 130606
[details]
work-in-progress work-in-progress patch. compiles, but no tests yet. checking EWS, mostly (but any comments welcome!)
WebKit Review Bot
Comment 2
2012-03-07 06:09:37 PST
Comment on
attachment 130606
[details]
work-in-progress
Attachment 130606
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/11851043
Early Warning System Bot
Comment 3
2012-03-07 06:54:50 PST
Comment on
attachment 130606
[details]
work-in-progress
Attachment 130606
[details]
did not pass qt-ews (qt): Output:
http://queues.webkit.org/results/11850084
Roland Steiner
Comment 4
2012-03-09 01:13:44 PST
Created
attachment 131005
[details]
Patch Patch - it's big, but the largest part is straightforward plumbing.
Antti Koivisto
Comment 5
2012-03-12 04:10:59 PDT
Comment on
attachment 131005
[details]
Patch I feel the scoped stylesheet feature is getting too complex and bloaty for anyone to use effectively. If I understand correctly @global wouldn't be needed in the first place if the spec wasn't limiting the selector matching to the scope by default. It seems to me that just using explicit :scope ancestor for scoped rules would achieve the same result with much less spec and implementation bloat. Since the required code changes are invasive, I don't think we should implement any more of this feature until it is cleaned up.
Tab Atkins
Comment 6
2012-03-13 08:59:04 PDT
(In reply to
comment #5
)
> (From update of
attachment 131005
[details]
) > I feel the scoped stylesheet feature is getting too complex and bloaty for anyone to use effectively. If I understand correctly @global wouldn't be needed in the first place if the spec wasn't limiting the selector matching to the scope by default. It seems to me that just using explicit :scope ancestor for scoped rules would achieve the same result with much less spec and implementation bloat.
This was discussed on mailing lists. The general feeling is that the behavior you seem to prefer (matching the behavior of querySelector) is basically broken; it is very rarely what authors actually want to happen, and it causes a lot of confusion and annoyance when authors run into it (with elements being matched that they didn't expect). The current behavior appears to be *nearly always* what authors expect and want, but there are still occasional instances where you really do want to match outside of the scoped subtree. This is why the new find() and findAll() methods are instead defaulting to the current <style scoped> behavior, where the entire selector must match within the scope. There's no equivalent @global construct for find/All(), but that's because JS can hack around this issue when necessary.
Konstantin Tokarev
Comment 7
2016-08-11 12:32:00 PDT
<style scoped> was removed from tree in
r156683
, as well as from spec.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug