Skip to content

added support for display: xxx !important, display: box !important included #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

added support for display: xxx !important, display: box !important included #72

wants to merge 1 commit into from

Conversation

ianstormtaylor
Copy link
Contributor

there might have been a more elegant solution, but the one I thought of needed pop() support to extract things from arguments.

would be a nice addition to the built-ins.

also, ideally this vendor-value would cover situations like transition: ***transform*** 1.5s, opacity .5s, but it gets really complicated because you can't count on transform being arguments[0] so...

maybe the vendor value function could just take the name of the value you want to vendorize and then apply it wherever it occurred in the callees arguments. not sure.

anyways.

@tj
Copy link
Collaborator

tj commented Feb 17, 2012

yeah I agree, some more list operation stuff would be great for stylus.

@tj
Copy link
Collaborator

tj commented Feb 17, 2012

i'll merge until we can come up with something else

display: vendor-value(type)
display(type, args...)
if type == box
display: vendor-value(type, args)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we could do display: vendor-value(type) args as well and bypass manipulating vendor-value(), it should work fine

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean so that vendor.styl value wouldn't need to be changed at all? i dont think i'm quite understanding. the way i'm seeing it, if vendor-value doesn't have the (arg, args...) then the !important won't get applied to vendorized values, eg:

[hidden] {
  display: -webkit-box;
  display: -moz-box;
  display: -o-box;
  display: -ms-box;
  display: box !important;
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh right sorry, nevermind me I'm in limbo

@czzarr
Copy link

czzarr commented May 18, 2012

hey TJ, could you merge this please?

@kizu
Copy link
Member

kizu commented Aug 16, 2012

@visionmedia We stumbled upon this bug, this can be somewhat critical, 'cause display: none !important becomes just display: none and it's awful.

Could you merge it? What are the stoppers for it? I could provide tests for this PR, or after merge for all display variants if you wish.

@tj
Copy link
Collaborator

tj commented Aug 16, 2012

hmm wont apply anymore, no stoppers that I remember, I just dont remember them until it pops up in notifications

@ghost
Copy link

ghost commented Aug 16, 2012

I just spent 20 minutes trying to figure out what's wrong, because display: none !important was compiled into display: none. Pretty awful bug!

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.

5 participants