diff --git a/layout/style/test/property_database.js b/layout/style/test/property_database.js index 1f7b98f01180..d4b210973e1c 100644 --- a/layout/style/test/property_database.js +++ b/layout/style/test/property_database.js @@ -6754,6 +6754,8 @@ var gCSSProperties = { domProp: "opacity", inherited: false, type: CSS_TYPE_LONGHAND, + applies_to_first_letter: true, + applies_to_first_line: true, applies_to_placeholder: true, applies_to_cue: true, initial_values: [ diff --git a/servo/components/style/properties/data.py b/servo/components/style/properties/data.py index 8e6cdd79a1b6..9ab3a40ca668 100644 --- a/servo/components/style/properties/data.py +++ b/servo/components/style/properties/data.py @@ -688,6 +688,7 @@ class PropertyRestrictions: def first_letter(data): props = set([ "color", + "opacity", "float", "initial-letter", @@ -722,6 +723,7 @@ class PropertyRestrictions: props = set([ # Per spec. "color", + "opacity", # Kinda like css-fonts? "-moz-osx-font-smoothing", diff --git a/testing/web-platform/meta/css/css-pseudo/first-letter-allowed-properties.html.ini b/testing/web-platform/meta/css/css-pseudo/first-letter-allowed-properties.html.ini index da26e4abbd57..310f12b82203 100644 --- a/testing/web-platform/meta/css/css-pseudo/first-letter-allowed-properties.html.ini +++ b/testing/web-platform/meta/css/css-pseudo/first-letter-allowed-properties.html.ini @@ -18,9 +18,6 @@ [margin should be applied to first-letter pseudo elements.] expected: FAIL - [opacity should be applied to first-letter pseudo elements.] - expected: FAIL - [padding should be applied to first-letter pseudo elements.] expected: FAIL diff --git a/testing/web-platform/tests/css/css-pseudo/first-letter-opacity-001-not-ref.html b/testing/web-platform/tests/css/css-pseudo/first-letter-opacity-001-not-ref.html new file mode 100644 index 000000000000..d1844499baa4 --- /dev/null +++ b/testing/web-platform/tests/css/css-pseudo/first-letter-opacity-001-not-ref.html @@ -0,0 +1,10 @@ + + +
+First
+ + diff --git a/testing/web-platform/tests/css/css-pseudo/first-letter-opacity-001-ref.html b/testing/web-platform/tests/css/css-pseudo/first-letter-opacity-001-ref.html new file mode 100644 index 000000000000..37e4dd5a2c91 --- /dev/null +++ b/testing/web-platform/tests/css/css-pseudo/first-letter-opacity-001-ref.html @@ -0,0 +1,16 @@ + + + +First
+ + diff --git a/testing/web-platform/tests/css/css-pseudo/first-line-opacity-001-not-ref.html b/testing/web-platform/tests/css/css-pseudo/first-line-opacity-001-not-ref.html new file mode 100644 index 000000000000..d020842a24b2 --- /dev/null +++ b/testing/web-platform/tests/css/css-pseudo/first-line-opacity-001-not-ref.html @@ -0,0 +1,10 @@ + + + +First
Second
Second
First
Second