mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
style: Reserve -- as a custom property name
I think this should be fairly low risk, let's try to get it done sooner rather than later. Differential Revision: https://phabricator.services.mozilla.com/D116456
This commit is contained in:
parent
44b94f66f9
commit
832807f15f
1 changed files with 1 additions and 1 deletions
|
@ -88,7 +88,7 @@ pub type Name = Atom;
|
|||
///
|
||||
/// <https://drafts.csswg.org/css-variables/#typedef-custom-property-name>
|
||||
pub fn parse_name(s: &str) -> Result<&str, ()> {
|
||||
if s.starts_with("--") {
|
||||
if s.starts_with("--") && s.len() > 2 {
|
||||
Ok(&s[2..])
|
||||
} else {
|
||||
Err(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue