Compatible with stylus-like syntax
See original GitHub issueconst Title = styled.h1`
font-size: 1.5em;
text-align: center;
color: palevioletred;
`;
const Wrapper = styled.section`
padding: 4em;
background: papayawhip;
`;
Compare with below:
const Title = styled.h1`
font-size 1.5em
text-align center
color palevioletred
`
const Wrapper = styled.section`
padding 4em
background papayawhip
`
Painful to write a ;
at the end of the line, hope stylus-like syntax is supported here.
I guess it is possible to be serialized through some simple rules: adding a ;
by line; adding :
by first space.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:25
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Stylus | An expressive, robust, feature-rich CSS language built ...
CSS Compatible. Don't like indented syntax ? ok, it's optional! You can write stylus like css-style without pain. IDE support. Both VSCode (with...
Read more >Looking for a Python CSS pre-processor with Stylus-like syntax?
Yes that's the bundle I'm using. It's just riddled with small issues that makes it tough to work with, for instance it enforces...
Read more >Be a CSS Superhero with Stylus - YoungInnovations' Blog
Stylus like SASS or LESS is a CSS preprocessor which includes all essential ... Stylus has JavaScript like syntax and pattern which is...
Read more >The best stylus for Android tablets and phones in 2022
... you might want an Android tablet stylus like Samsung's S-Pen, ... The Adonit Dash 4 is the best broadly compatible Android stylus...
Read more >Is the Dell Active Pen compatible with the Inspiron 15-5578?
Hello CARRRMINE,. The Inspiron 5578 is a touchscreen model and you will require a capacitive stylus like http://dell.to/2rSlsKN. The screen on ...
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 FreeTop 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
Top GitHub Comments
Sorry, but I want to keep the CSS in Styled Components as close to vanilla CSS as possible, with the exception of nesting and autoprefixing. Anything else could potentially lead to very confusing behaviour, particularly when it comes to interpolations.
If you’re finding things like
:
and;
painful potentially you’re writing too much CSS. Try breaking out snippets and bringing them in with interpolations, that should make things a little nicer to work with.Explored this a bit when working on the no-semicolon options though for different reasons – since i wanted to try and monkey-patch some common syntax errors i.e
color red;
.So it is possible, you just have to do a lot more book keeping to avoid false positives since there are many valid ways you can write css selectors(involving whitespace) and properties that look syntactical similar without the colon.
Though it might not make it into s-c – but if you do have some ideas on the subject i’m open to input on implementations, the one i came up with at the time involved a 100% in/out approach to one format over the other.