Open Bug 1448250 Opened 6 years ago Updated 4 months ago

Implement CSS attr(<attr-name> string)

Categories

(Core :: CSS Parsing and Computation, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: sebo, Unassigned)

References

(Blocks 1 open bug, )

Details

(Keywords: dev-doc-needed)

The CSS Values and Units Module Level 5 extends the attr() function to optionally specify a type or unit, which specifies how the attribute value should be parsed.

This bug is meant to implement the 'string' type.

Sebastian
Summary: Implement CSS attr(<attr-name>, string, <attr-fallback>) → Implement CSS attr(<attr-name> string, <attr-fallback>)
Priority: -- → P3

Tests

4 sub-tests:
width: attr(attr-test-valid1 length);
width: attr(attr-test-invalid1 number, 0);
width: attr(attr-test-invalid2 length, 100);
width: attr(attr-test-invalid3 number, 100px);
http://w3c-test.org/css/css-values/attr-invalid-type-008.html

width: attr(data-test length, 200px);
http://w3c-test.org/css/css-values/attr-length-invalid-cast.html

width: attr(data-test length, 0);
http://w3c-test.org/css/css-values/attr-length-valid-zero.html

width: attr(data-test px, 200);
http://w3c-test.org/css/css-values/attr-px-invalid-cast.html

Severity: normal → S3
Summary: Implement CSS attr(<attr-name> string, <attr-fallback>) → Implement CSS attr(<attr-name> string)
You need to log in before you can comment on or make changes to this bug.