Add styling for playground features#12196
Add styling for playground features#12196aditya1010-max wants to merge 8 commits intoopenstreetmap:developfrom
Conversation
|
My first thought: We should only use one single color for all playground features. And as blue and green are already used for water/natural features a lot, I think it's best to use another color. The proposed shade of pink should work fine. If needed, for some special features like the zipline and tunnel features mentioned above, we could distinguish them by altering the stroke and/or dashing (e.g. in order to create analogies to road tunnels / bridges). |
What about allowing at least different shades of pink? |
Yeah, colors wouldn’t work well here, since they’re already used for things like fountains, trees, and shrubs, which are commonly present in playgrounds and wouldn’t blend well with playground features. |
|
I suggest we split up the effort. The initial issue and IMO most important one is to be able to see that lines / areas with Implementation detail: Is there a way to add this without adding all tags to the class "registry" but just the key? I assume adding all those tags will add to the performance cost that our rendering has. The second phase could be to see how to better style specific |
I think we can try implementing this, as it would be beneficial, especially from a performance perspective. |
|
Do we want say |
|
Yes , the base .tag-playground style would apply to any playground=* value, which helps distinguish these features from unstyled ones. More specific styling would only apply to known values, example- .tag-playground { ... } Unknown values would simply fall back to the base style. |
|
This plan follows the approach suggested by @tordans above, with additional details to clarify the steps. It is divided into two logic steps and two styling steps for easy implementation a. Update classification logicModify
b. Apply common playground stylingDefine a single, consistent style to make playground features visually distinct from unstyled features: Example: .tag-playground { ... }c. Expose
|
I get the concern about unintentionally styling arbitrary values. One option would be to treat the base class as the default style, and then apply additional styling only for specific presets. That would give us flexibility to fine-tune individual presets without over-styling everything by default. However, that approach also limits the benefits of this architecture. |
|
I just noticed that the current styling for playground=area seems to clash with landuse=industrial, so I’ll revert it to the base class styling. I think it’s better to keep this PR focused on introducing the architecture and a base style. For the styles used in this PR, since these styles will apply across multiple tags, feedback and opinions are appreciated. |







Addresses #12142
Adds distinct styling for
playground=*features to make them visible and distinguishable from generic geometries.Includes styling for:
playground=zipwireplayground=tunnel_tubeplayground=structureColors were chosen to be visually distinct yet consistent with related features. Happy to adjust them based on feedback.
After
Preset panel