Bug 1973440 - Fix serialization of light-dark(). r=dshin a=pascalc
Differential Revision: https://phabricator.services.mozilla.com/D254686
This commit is contained in:
committed by
pchevrel@mozilla.com
parent
6901457891
commit
8ebce472f4
@@ -211,7 +211,7 @@ pub use self::GenericCaretColor as CaretColor;
|
||||
|
||||
/// A light-dark(<light>, <dark>) function.
|
||||
#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToShmem, ToCss, ToResolvedValue)]
|
||||
#[css(function, comma)]
|
||||
#[css(function = "light-dark", comma)]
|
||||
#[repr(C)]
|
||||
pub struct GenericLightDark<T> {
|
||||
/// The value returned when using a light theme.
|
||||
|
||||
@@ -28,6 +28,7 @@ test_valid_value("color", "rgb(-2, 3, 4)", "rgb(0, 3, 4)");
|
||||
test_valid_value("color", "rgb(100, 200, 300)", "rgb(100, 200, 255)");
|
||||
test_valid_value("color", "rgb(20, 10, 0, -10)", "rgba(20, 10, 0, 0)");
|
||||
test_valid_value("color", "rgb(100%, 200%, 300%)", "rgb(255, 255, 255)");
|
||||
test_valid_value("color", "light-dark(black, white)");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user