mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
style: Expose scrollbar-inline-size as a chrome-only environment variable
After the previous patches this is rather straight-forward. Reviewed in: https://phabricator.services.mozilla.com/D168148
This commit is contained in:
parent
89e01f1df6
commit
1a3b32a248
2 changed files with 21 additions and 1 deletions
|
@ -85,6 +85,10 @@ fn get_content_preferred_color_scheme(_device: &Device) -> VariableValue {
|
|||
VariableValue::ident("light")
|
||||
}
|
||||
|
||||
fn get_scrollbar_inline_size(device: &Device) -> VariableValue {
|
||||
VariableValue::pixels(device.scrollbar_inline_size().px())
|
||||
}
|
||||
|
||||
static ENVIRONMENT_VARIABLES: [EnvironmentVariable; 4] = [
|
||||
make_variable!(atom!("safe-area-inset-top"), get_safearea_inset_top),
|
||||
make_variable!(atom!("safe-area-inset-bottom"), get_safearea_inset_bottom),
|
||||
|
@ -120,7 +124,7 @@ macro_rules! lnf_int_variable {
|
|||
}};
|
||||
}
|
||||
|
||||
static CHROME_ENVIRONMENT_VARIABLES: [EnvironmentVariable; 6] = [
|
||||
static CHROME_ENVIRONMENT_VARIABLES: [EnvironmentVariable; 7] = [
|
||||
lnf_int_variable!(
|
||||
atom!("-moz-gtk-csd-titlebar-radius"),
|
||||
TitlebarRadius,
|
||||
|
@ -146,6 +150,10 @@ static CHROME_ENVIRONMENT_VARIABLES: [EnvironmentVariable; 6] = [
|
|||
atom!("-moz-content-preferred-color-scheme"),
|
||||
get_content_preferred_color_scheme
|
||||
),
|
||||
make_variable!(
|
||||
atom!("scrollbar-inline-size"),
|
||||
get_scrollbar_inline_size
|
||||
),
|
||||
];
|
||||
|
||||
impl CssEnvironment {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue