3 ms·
And can someone explain the reasoning behind using slashes? Why change the syntax of a million other css rules that just use spaces?
by SamBam 10y ago
And can someone explain the reasoning behind using slashes? Why change the syntax of a million other css rules that just use spaces?
- 33degrees 10y agoSometimes there are multiple values within a dimension, for example: grid-template: 50% 50% / 20% 80%;
- gsnedders 10y agoAnd hence, otherwise, it would be ambiguous. Slashes are almost always used in CSS to disambiguate things that would otherwise be ambiguous.
- zerocrates 10y agoSlashes are hidden all over the place in CSS shorthand properties (for example, you can use a slash to specify both font-size and line-height together in a "font:" declaration).