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

css new standard idea #759

Closed
annopnod opened this issue Nov 24, 2016 · 1 comment
Closed

css new standard idea #759

annopnod opened this issue Nov 24, 2016 · 1 comment

Comments

@annopnod
Copy link

annopnod commented Nov 24, 2016

css new standard idea
code

<style> #Data{ width: 100px; } #Topic{ width: #Data.width;// #Topic width= 100px; } #Topic2{ width: #Data.width + 100px;// #Topic2 width= 200px; } </style>
@astearns
Copy link
Member

See Custom Properties: https://drafts.csswg.org/css-variables-1/

Your sample can be expressed as:

<style> :root{ --data: 100px; } #Topic{ width: var(--data); } #Topic2{ width: calc(var(--data) + 100px) } </style>

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

No branches or pull requests

2 participants