This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28893 - Specify <noscript>'s `display` magic via CSS's `scripting` media feature
Summary: Specify <noscript>'s `display` magic via CSS's `scripting` media feature
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: https://html.spec.whatwg.org/multipag...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-05 11:42 UTC by Chris Rebert
Modified: 2015-08-30 08:28 UTC (History)
1 user (show)

See Also:


Attachments

Description Chris Rebert 2015-07-05 11:42:26 UTC
Spec section: https://html.spec.whatwg.org/multipage/rendering.html#hidden-elements

> The user agent is expected to force the 'display' property of noscript elements for whom scripting is enabled to compute to 'none', irrespective of CSS rules.


Can't this just be specified via CSS instead using the `scripting` media feature (http://dev.w3.org/csswg/mediaqueries-4/#scripting )? Something like:
```
noscript { display: block; }

@media (scripting: none) {
    noscript {
        display: none !important;
    }
}
```
Comment 1 Chris Rebert 2015-07-06 08:18:43 UTC
(In reply to Chris Rebert from comment #0)

Erm, rather, make that:
```
@media (scripting: none) {
    noscript { display: block; }
}
@media (scripting: enabled), (scripting: initial-only) {
    noscript { display: none !important; }
}
```
Comment 2 Chris Rebert 2015-08-30 08:28:21 UTC
Fixed by https://github.com/whatwg/html/pull/25