Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Issue 2231593003: Add [hidden] rule to cr-elements :root stylesheet (Closed)

Created:
4 years, 4 months ago by michaelpg
Modified:
4 years, 3 months ago
Reviewers:
dschuyler
CC:
chromium-reviews, michaelpg+watch-elements_chromium.org, stevenjb+watch-md-settings_chromium.org, dbeam+watch-elements_chromium.org, oshima+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add [hidden] rule to cr-elements :root stylesheet Chrome has a User-Agent style rule that sets [hidden] to { display: none }, but this is overridden by almost any other rule that modifies display (e.g. a class which sets { display: flex }). For [hidden] to work as expected, we need to add !important to the rule. For shadow DOM, this needs to use the (deprecated) /deep/ combinator to apply everywhere. This CL is necessary to stop using iron-flex-layout/classes which sets a ton of styles globally, most importantly this one. BUG=498405 R=dschuyler@chromium.org CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Patch Set 1 #

Total comments: 6

Patch Set 2 : comment spacing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -0 lines) Patch
M ui/webui/resources/cr_elements/shared_vars_css.html View 1 1 chunk +8 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 18 (6 generated)
michaelpg
4 years, 4 months ago (2016-08-10 16:10:54 UTC) #3
Dan Beam
https://codereview.chromium.org/2231593003/diff/1/ui/webui/resources/cr_elements/shared_vars_css.html File ui/webui/resources/cr_elements/shared_vars_css.html (right): https://codereview.chromium.org/2231593003/diff/1/ui/webui/resources/cr_elements/shared_vars_css.html#newcode18 ui/webui/resources/cr_elements/shared_vars_css.html:18: */ nit: /* Everybody seems to love useless lines. ...
4 years, 4 months ago (2016-08-10 16:16:36 UTC) #5
michaelpg
https://codereview.chromium.org/2231593003/diff/1/ui/webui/resources/cr_elements/shared_vars_css.html File ui/webui/resources/cr_elements/shared_vars_css.html (right): https://codereview.chromium.org/2231593003/diff/1/ui/webui/resources/cr_elements/shared_vars_css.html#newcode18 ui/webui/resources/cr_elements/shared_vars_css.html:18: */ On 2016/08/10 16:16:36, Dan Beam wrote: > nit: ...
4 years, 4 months ago (2016-08-10 16:27:56 UTC) #6
Dan Beam
https://codereview.chromium.org/2231593003/diff/1/ui/webui/resources/cr_elements/shared_vars_css.html File ui/webui/resources/cr_elements/shared_vars_css.html (right): https://codereview.chromium.org/2231593003/diff/1/ui/webui/resources/cr_elements/shared_vars_css.html#newcode18 ui/webui/resources/cr_elements/shared_vars_css.html:18: */ On 2016/08/10 16:27:56, michaelpg wrote: > On 2016/08/10 ...
4 years, 4 months ago (2016-08-10 16:29:24 UTC) #7
michaelpg
On 2016/08/10 16:29:24, Dan Beam wrote: > https://codereview.chromium.org/2231593003/diff/1/ui/webui/resources/cr_elements/shared_vars_css.html > File ui/webui/resources/cr_elements/shared_vars_css.html (right): > > https://codereview.chromium.org/2231593003/diff/1/ui/webui/resources/cr_elements/shared_vars_css.html#newcode18 ...
4 years, 4 months ago (2016-08-10 16:38:02 UTC) #8
dschuyler
https://codereview.chromium.org/2231593003/diff/1/ui/webui/resources/cr_elements/shared_vars_css.html File ui/webui/resources/cr_elements/shared_vars_css.html (right): https://codereview.chromium.org/2231593003/diff/1/ui/webui/resources/cr_elements/shared_vars_css.html#newcode19 ui/webui/resources/cr_elements/shared_vars_css.html:19: :root /deep/ [hidden] { On 2016/08/10 16:27:56, michaelpg wrote: ...
4 years, 4 months ago (2016-08-10 18:58:26 UTC) #9
Dan Beam
+noms cuz dragons
4 years, 4 months ago (2016-08-11 06:09:33 UTC) #12
noms (inactive)
On 2016/08/11 06:09:33, Dan Beam wrote: > +noms cuz dragons (audible, but understandable, sigh) side ...
4 years, 4 months ago (2016-08-11 07:15:23 UTC) #14
michaelpg
On 2016/08/11 07:15:23, noms (inactive) wrote: > On 2016/08/11 06:09:33, Dan Beam wrote: > > ...
4 years, 4 months ago (2016-08-11 07:46:49 UTC) #15
chromium-reviews
What is the real impact of the overhead of including it everywhere (like what order ...
4 years, 4 months ago (2016-08-11 21:10:52 UTC) #16
michaelpg
On 2016/08/11 21:10:52, chromium-reviews wrote: > What is the real impact of the overhead of ...
4 years, 4 months ago (2016-08-12 18:37:04 UTC) #17
dschuyler
4 years, 4 months ago (2016-08-17 23:47:47 UTC) #18
On 2016/08/12 18:37:04, michaelpg wrote:
> On 2016/08/11 21:10:52, chromium-reviews wrote:
> > What is the real impact of the overhead of including it everywhere (like
> > what order of magnitude is it)?
> 
> According to the Polymer team, ¯\_(ツ)_/¯
> 
> I'll try doing it that way, and see what happens.
> 
> > 
> > On Thu, Aug 11, 2016 at 12:46 AM, <mailto:michaelpg@chromium.org> wrote:
> > 
> > > On 2016/08/11 07:15:23, noms (inactive) wrote:
> > > > On 2016/08/11 06:09:33, Dan Beam wrote:
> > > > > +noms cuz dragons
> > > >
> > > > (audible, but understandable, sigh)
> > > >
> > > > side note: if you include `iron-flex-layout/iron-flex-
> > > layout-classes.html`
> > > > everywhere, that should define this rule for you, sans dragons.
> > >
> > > Right, we would have to include that *and* do <style
> > > include="iron-positioning">
> > > in every. single. component.
> > >
> > > Maybe that's the right thing to do, because any component that needs to
> > > hide
> > > content is, by definition, styling stuff, but the overhead seems crazy.
> > >
> > > https://codereview.chromium.org/2231593003/
> > >
> > 
> > -- 
> > You received this message because you are subscribed to the Google Groups
> > "Chromium-reviews" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> email
> > to mailto:chromium-reviews+unsubscribe@chromium.org.

Ack :)

Powered by Google App Engine
This is Rietveld 408576698