mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Dissallow !important in @font-face
This commit is contained in:
parent
0945bd9fb4
commit
6a5fed0471
1 changed files with 5 additions and 2 deletions
|
@ -54,8 +54,11 @@ pub fn parse_font_face_rule(rule: AtRule, parent_rules: &mut Vec<CSSRule>, base_
|
||||||
match item {
|
match item {
|
||||||
DeclAtRule(rule) => log_css_error(
|
DeclAtRule(rule) => log_css_error(
|
||||||
rule.location, format!("Unsupported at-rule in declaration list: @{:s}", rule.name).as_slice()),
|
rule.location, format!("Unsupported at-rule in declaration list: @{:s}", rule.name).as_slice()),
|
||||||
Declaration(Declaration{ location: location, name: name, value: value, important: _}) => {
|
Declaration(Declaration{ location, name, value, important }) => {
|
||||||
|
if important {
|
||||||
|
log_css_error(location, "!important is not allowed on @font-face descriptors");
|
||||||
|
continue
|
||||||
|
}
|
||||||
let name_lower = name.as_slice().to_ascii_lower();
|
let name_lower = name.as_slice().to_ascii_lower();
|
||||||
match name_lower.as_slice() {
|
match name_lower.as_slice() {
|
||||||
"font-family" => {
|
"font-family" => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue