mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Add links to the spec for components/style
This commit is contained in:
parent
4fd4370a96
commit
9f6d94e107
2 changed files with 13 additions and 1 deletions
|
@ -29,7 +29,7 @@ impl Range<specified::Length> {
|
||||||
match width {
|
match width {
|
||||||
&specified::Length::Absolute(value) => value,
|
&specified::Length::Absolute(value) => value,
|
||||||
&specified::Length::FontRelative(value) => {
|
&specified::Length::FontRelative(value) => {
|
||||||
// http://dev.w3.org/csswg/mediaqueries3/ - Section 6
|
// http://dev.w3.org/csswg/mediaqueries3/#units
|
||||||
// em units are relative to the initial font-size.
|
// em units are relative to the initial font-size.
|
||||||
let initial_font_size = longhands::font_size::get_initial_value();
|
let initial_font_size = longhands::font_size::get_initial_value();
|
||||||
value.to_computed_value(initial_font_size, initial_font_size)
|
value.to_computed_value(initial_font_size, initial_font_size)
|
||||||
|
@ -58,11 +58,14 @@ impl<T: Ord> Range<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// http://dev.w3.org/csswg/mediaqueries-3/#media1
|
||||||
#[derive(PartialEq, Copy, Debug)]
|
#[derive(PartialEq, Copy, Debug)]
|
||||||
pub enum Expression {
|
pub enum Expression {
|
||||||
|
/// http://dev.w3.org/csswg/mediaqueries-3/#width
|
||||||
Width(Range<specified::Length>),
|
Width(Range<specified::Length>),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// http://dev.w3.org/csswg/mediaqueries-3/#media0
|
||||||
#[derive(PartialEq, Eq, Copy, Debug)]
|
#[derive(PartialEq, Eq, Copy, Debug)]
|
||||||
pub enum Qualifier {
|
pub enum Qualifier {
|
||||||
Only,
|
Only,
|
||||||
|
@ -87,6 +90,7 @@ impl MediaQuery {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// http://dev.w3.org/csswg/mediaqueries-3/#media0
|
||||||
#[derive(PartialEq, Eq, Copy, Debug)]
|
#[derive(PartialEq, Eq, Copy, Debug)]
|
||||||
pub enum MediaQueryType {
|
pub enum MediaQueryType {
|
||||||
All, // Always true
|
All, // Always true
|
||||||
|
|
|
@ -21,10 +21,18 @@ use font_face::{FontFaceRule, parse_font_face_block};
|
||||||
use util::smallvec::{SmallVec, SmallVec2};
|
use util::smallvec::{SmallVec, SmallVec2};
|
||||||
|
|
||||||
|
|
||||||
|
/// Each style rule has an origin, which determines where it enters the cascade.
|
||||||
|
///
|
||||||
|
/// http://dev.w3.org/csswg/css-cascade/#cascading-origins
|
||||||
#[derive(Clone, PartialEq, Eq, Copy, Debug)]
|
#[derive(Clone, PartialEq, Eq, Copy, Debug)]
|
||||||
pub enum Origin {
|
pub enum Origin {
|
||||||
|
/// http://dev.w3.org/csswg/css-cascade/#cascade-origin-ua
|
||||||
UserAgent,
|
UserAgent,
|
||||||
|
|
||||||
|
/// http://dev.w3.org/csswg/css-cascade/#cascade-origin-author
|
||||||
Author,
|
Author,
|
||||||
|
|
||||||
|
/// http://dev.w3.org/csswg/css-cascade/#cascade-origin-user
|
||||||
User,
|
User,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue