We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Support lighting models through CSS. Ideally this should:
Allow CSS authors to use a custom property (--light?) to define lighting and access it with JavaScript using the CSSOM.
--light
--light: <light-function> [<light-position>]? [<light-attachment>]?
Where:
<light-function>
ambient-light(<color>, [<intensity>]?)
point-light(<color>, [<intensity>, [,distance]?]?)
<light-position>
<length>
-100px 200px 300px
50% 50% 0
<light-attachment>
fixed
absolute
static
Examples:
body { --light: ambient-light(#fff, .3), point-light(#f00, 1) 50% 50% 50% relative, point-light(#0f0, 1) 0px 300px 800px absolute, point-light(#00f,24) 700px 400px 800px static; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Support lighting models through CSS. Ideally this should:
Initial thoughts:
Allow CSS authors to use a custom property (
--light
?) to define lighting and access it with JavaScript using the CSSOM.Where:
<light-function>
could be something along the lines of:ambient-light(<color>, [<intensity>]?)
point-light(<color>, [<intensity>, [,distance]?]?)
<light-position>
is a triplet of css<length>
s:-100px 200px 300px
(defaults to50% 50% 0
?)<light-attachment>
is one offixed
- light is clamped to the viewport / scrollbox?absolute
- light is positioned relative to the document?static
- light is is positioned / transformed relative to the element it's defined on.Examples:
The text was updated successfully, but these errors were encountered: