Skip to content

Conversation

@ericf
Copy link
Collaborator

@ericf ericf commented Nov 27, 2013

Anytime a display declaration is used in Pure with a value other than none, we need to add an additional rule with similar selectors (appended with [hidden]) with a display: none; declaration. This allows the hidden HTML attribute to work properly on elements styled by Pure.

The following button will be hidden from view with these changes:

 <button class="pure-button" hidden>No showy</button>

This is an initial pass at applying this practice to Pure's source. We should discuss this and make the selectors used smarter and probably clean them up. Overall this added 0.1KB to Pure's size.


Fixes #177

Anytime a `display` declaration is used in Pure with a value other than
`none`, we need to add an additional rule with similar selectors
(appended with `[hidden]`) with a `display: none;` declaration. This
allows the `hidden` HTML attribute to work properly on elements styled
by Pure.

The following button will be hidden from view with these changes:

    <button class="pure-button" hidden>No showy</button>

Fixes pure-css#177
@ericf
Copy link
Collaborator Author

ericf commented Dec 7, 2013

Closing in favor of #256

@ericf ericf closed this Dec 7, 2013
@ericf ericf deleted the hidden-html-attr branch December 8, 2013 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hidden formelements don't hide

1 participant