+ 2
sololearn , css variables
i recently found that solo learn don't support css variable ...or is their any other way https://code.sololearn.com/WV2XCbhiVisz/?ref=app
10 Antworten
+ 6
There is something that acts like a variable when using :root{} class I use it when I have multiple properites that have the same value
:root{
//store the colour red in cRed
--cRed:red;
}
//using the cRed variable
background-color:var(--cRed);
+ 3
Please show your code here so that we can help you
https://www.sololearn.com/post/75089/?ref=app
+ 3
anjit pariyar Support for CSS variables will likely be a factor of one's device than anything to do with the app itself.
+ 2
Gordon i posted my code..ignore other part rather than css variable...you can focus on card-header part
+ 2
please refer https://anjitzero.github.io/remainder/ almost same code
+ 2
The CSS variables of your code works fine on my device, can you use this code to check your browser stats, and post the stats here?
https://code.sololearn.com/W4vC0w43yqNQ/?ref=app
+ 2
name : Android Browser
version : 4.0
layout : Blink
os : Android 6.0
description : Android Browser 4.0 (like Chrome 46.0.2490.76) on Android 6.0
+ 2
knowing that it works on your device , i now realize what mod David Carroll was talking about
+ 2
Yes, CSS Variable is available for Chrome 49 onwards
ref: Mozilla Doc
https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties#Browser_compatibility
SoloLearn runs web code with browser of own device. Hence the browser version of your device matters.
Your code is correct though. You can run it on websites such as codepen or repl.it
+ 1
anjit pariyar update webview