Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Express legacy <font> rendering with CSS #11990

Copy link
Copy link
@Crissov

Description

@Crissov
Issue body actions

What is the issue with the HTML Standard?

In the Rendering chapter, <font> and its attributes are mapped to CSS by prose. This could be accompanied by actual CSS rules involving attr() which would almost achieve the same.

font[color] {
  color: attr(color type(<color>));
}
font[face] {
  font-family: attr(face type(<string>));
}
font[size="1"], 
font[size="0"], 
font[size="-2"], 
/* font[size<-2] */ {
  font-size: x-small;
}
font[size="2"], 
font[size="-1"] {
  font-size: small;
}
font[size="3"], 
font[size="-0"], 
font[size="+0"] {
  font-size: medium;
}
font[size="4"], 
font[size="+1"] {
  font-size: large;
}
font[size="5"], 
font[size="+2"] {
  font-size: x-large;
}
font[size="6"], 
font[size="+3"] {
  font-size: xx-large;
}
font[size="7"], 
/* font[size>7], */
font[size="+4"], 
font[size="+5"], 
font[size="+6"], 
font[size="+7"] {
  font-size: xxx-large;
}

(The attribute value numeric comparisons with > and < are not yet available in selectors but would be within style queries inside if().)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.