Open Bug 1848458 Opened 1 year ago Updated 23 days ago

[css-ui-4] Add stripes() function to 'outline-color' property

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement

Tracking

()

People

(Reporter: sebo, Unassigned)

References

(Blocks 1 open bug, )

Details

(Keywords: dev-doc-needed)

In CSS UI 4 the outline-color property takes <image-1D> values and with those the stripes() function defined in CSS Images 4. With that function it is possible to define multiple colors for the outline.

Among other use cases, this is especially important from an accessibility point of view.

Sebastian

In the pdf.js context, UX asked us to change the outline of selected editors in order to have a bi-colored one: stripes(white 1px, blue 2px, white 1px).
It's especially helpful to make it easily visible whatever the background is and in the pdf viewer we don't have the control on the background color (i.e. the current page color).
I tried different approaches to implement it and only one worked correctly:
https://github.com/mozilla/pdf.js/blob/3f7060e77743a2d3244c95d364b52e0331ed4ed2/web/annotation_editor_layer_builder.css#L146-L174.
That said, it'd be helpful to have such a feature.

Calixte: why does outline-style: auto not work?

Flags: needinfo?(cdenizet)

In such a case, the outline is composed of 2 lines not 3 and I can't change the color.

Flags: needinfo?(cdenizet)

You can change the color with accent-color.

In my case it was to change the white not the blue.

You need to log in before you can comment on or make changes to this bug.