-
Notifications
You must be signed in to change notification settings - Fork 715
[css-paint][css-images] Named Hatching Patterns #1078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
For reference, SVG 2 introduced a Maybe both approached could be merged somehow. Also, back in 2014 I already came up with the idea of allowing to create custom patterns via an So, maybe the keywords for the Heraldic tinctures may later be defined using the Sebastian |
Closing as wontfix, as this can be handled by referencing SVG paint servers. |
@fantasai The request was specifically about named, predefined patterns "where consistent semantics of the fill are more important than the actual looks". |
Agree with closing; too specialized and domain-specific a use case. Yes, these can be used in technical drawing etc but in those cases, the format (like CGM for example) has a registry of named hatch patterns. In SVG we went with a more web-like approach, no registry, use urls to link to a paint server. |
In particular, the "no MQs" requirement makes this pretty niche. Why avoid MQs? We don't generally design features specifically to allow you to avoid using other features, unless there's a heavy convenience factor involved. Here, it's just a matter of setting some variables to colors, and in an It also lets you use whatever patterns you want, rather than baking some in. Heraldry might have some common color/pattern associations, but there's no particular reason to assume that is a desirable mapping in general for other use-cases. |
Does this mean you would also shoot down an alternative proposal to add named hatching patterns without any reference to a tincture or material? |
Probably. I'd prefer to see evidence that a set of hatching names was seeing wide use in a library or preprocessor before considering whether we should bake it in to CSS. |
I meant something generic like
|
@astearns' comment still stands - need to see wide usage (or convincing proof that they would take up wide usage were they provided) before adding to the language. |
Named Fills
Solid colors, gradients and custom patterns are nice and all, but in some cases it would be nice to have a named fill that renders as either a solid color (or image or gradient) on a capable screen but as a hatching pattern on a monochrome print-out – without having to specify it manually and without Media Queries. This is of interest where consistent semantics of the fill are more important than the actual looks, e.g. for physical materials in technical drawings or tinctures in heraldry.
Since the
fill
shorthand in SVG/CSS-Paint gets its valid values from, among others,fill-color
andfill-image
, which basically use<color>
and<image>
, respectively, it would be nice if either one of these value types orfill
itself would accept some predefined keywords.Tinctures
Heraldic tinctures traditionally use somewhat French names in English and there are only few and except for rare
orange
they do not clash with existing CSS color keywords, so they could be used as they are:or
(yellow/gold),argent
(white/silver),gules
(red),azure
(blue),vert
(green),sable
(black),purpure
(purple/violet). Today, the Petra Sancta system is widely accepted and followed for hatching (but also extended).File:Complete Guide to Heraldry Fig036.png
There are also metals, furs and some other materials that have canonical representations in classic European heraldry.
Materials
There are several standards for technical drawings depending on the actual field (i.e. architecture vs. engineering etc.) that define hatching patterns, e.g. ISO 81714-1 section 6.9 and IEC 81714-2 annex H, ISO 128-50 section 5, DIN 201. I really do not know enough about this to recommend anything.
CSS Definitions
The text was updated successfully, but these errors were encountered: