[idea] pseudo inline styles
See original GitHub issueAn idea for handling CSS:
var bel = require('bel')
var css = {
position: 'absolute',
top: 100,
left: 200
}
var element = bel`<div style=${css}>Hello!</div>`
Which would detect the style
key and use dom-css to set the .style[prop]
directly on the elements (CSP safe). It will even do vendor prefixing.
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
CSS Pseudo-classes with inline styles
Think of inline styles as the styles applied to some anonymous super-specific ID selector: those styles only apply to that one very element...
Read more >Is there a way to create an inline style for a CSS pseudo- ...
Normalize ( type all the tags you will be using at first and declare null values in them i.e margin,border, padding ) ·...
Read more >[Proposal] Expand inline style='' attributes to allow pseudo- ...
In a recent email to www-style, James Kyle asks for the ability to use inline styles (the style attribute) to style an element...
Read more >Re: dynamic states and pseudo elements for inline styles
And the first step is done: > https://discourse.wicg.io/t/proposal-expand-inline-style-attributes-to-allow-pseudo-class-element-styling/1812 ...
Read more >Inline Styles: Yes or No?
These libraries sought to solve some of the limitations that come with using inline styles, most notably lack of support for pseudo-selectors, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Agree with @shama. Yeah, also wouldn’t use this, but not opposed tho if people want it. It would need to be ported to yo-yoify and tested on both projects before we could land it
On Sun, May 21, 2017, 19:20 Charlike Mike Reagent notifications@github.com wrote:
Maybe it’s because I rarely use inline styles and when I do, it’s almost always directly on the element. Non-inline CSS is far superior IMO so this convenience isn’t useful to me.
But, if the overwhelming consensus is to add this back then we can.