Skip to content
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

Expand shortcut properties #8

Open
NV opened this issue Oct 26, 2010 · 4 comments
Open

Expand shortcut properties #8

NV opened this issue Oct 26, 2010 · 4 comments
Labels

Comments

@NV
Copy link
Owner

NV commented Oct 26, 2010

Browsers mostly store longhand properties rather than shortcuts. When you write background: rgb(40, 40, 40) WebKit stores it as

style:
  0: "background-image"
  1: "background-repeat-x"
  2: "background-repeat-y"
  3: "background-attachment"
  4: "background-position-x"
  5: "background-position-y"
  6: "background-origin"
  7: "background-clip"
  8: "background-color"

And that's how Firefox stores it:

style: 
  0: "background-color"
  1: "background-image"
  2: "background-repeat"
  3: "background-attachment"
  4: "background-position"
  5: "background-clip"
  6: "background-origin"
  7: "background-size"

The differences are just about in every property. I'll probably stick to WebKit implementation.

@Inviz
Copy link

Inviz commented Oct 27, 2010

Agreed, i find it more explicit and useful

@papandreou
Copy link
Contributor

Could the expansion be an optional feature? I'm using CSSOM to perform some specific manipulations on other people's CSS, and if they used the "background" shorthand they probably meant it and wouldn't like it to be expanded to the 8 background-* properties.

@NV
Copy link
Owner Author

NV commented Mar 1, 2011

Yes, it will be configurable.

@cburgmer
Copy link

I'd be interested in this feature, as I need to manipulate the background-image url, independent of whether it is encapsulated in a broad background statement or not. For now that's possibly the biggest showstopper for me when moving away from JSCSSP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants