Sass Function to determine if a string has quotes
See original GitHub issueThere’s currently no way to check if a string has quotes. I suggest we add:
has-quotes($string) => true/false
Issue Analytics
- State:
- Created 9 years ago
- Reactions:3
- Comments:18 (7 by maintainers)
Top Results From Across the Web
Strings - Sass
Quoted strings are written between either single or double quotes, as in "Helvetica Neue" . They can contain interpolation, as well as any...
Read more >SCSS custom function and String extra quotes - Stack Overflow
You can see extra quotes in the compiled css. So i've tried to gsub it with no luck. Why does scss adds these...
Read more >Sass String Functions - W3Schools
Sass String Functions ; unquote(string), Removes quotes around string (if any), and returns the result. Example: unquote("Hello world!") Result: Hello world!
Read more >SASS | String Functions - GeeksforGeeks
1. quote($string) Function: This function adds the quotes to the unquoted string and returns the quoted string. Example:.
Read more >Sass String Functions - TutorialsTeacher
Function Description Examples
unquote($string) Removes the quotes, if any, around a string unquote("hello") Result: hello
str‑length($string) Returns the number of characters in a string str‑length("hello")...
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
I really really needed this, so I wrote a polyfill that uses an interpolation quirk, probably don’t use this, lol.
https://www.sassmeister.com/gist/b91941959971c3ebeddd9e40f80f8287 https://gist.github.com/brantwedel/b91941959971c3ebeddd9e40f80f8287
@yairEO You don’t need quotes here, you need parentheses.