Replies: 7 comments 14 replies
-
Tagging @mdn/yari-content |
Beta Was this translation helpful? Give feedback.
-
I like the idea to have a less flat hierarchy (with @Elchi3, we were able to unflatten a bit the API almost a decade ago).
I'm worried here that while trying to solve the unpredictability of adding I can imagine fairly easy solutions for sidebar macros, but how do you plan to use I think you are right that this is the key problem, but what would be the solution? Immediately, I can see two:
The first one means any author needs to know the hierarchy, the second one is Maybe there are more solutions to consider here… (I would like to avoid the complexity of |
Beta Was this translation helpful? Give feedback.
-
I'd probably suggest grouping some of this under /values, these seem all to be values (see https://www.w3.org/TR/css-values-4/)
Seems a bit odd to not group them as values, granted that doesn't help with Combinators are selectors, and so should be included with selectors. |
Beta Was this translation helpful? Give feedback.
-
Related: mdn/browser-compat-data#10563 |
Beta Was this translation helpful? Give feedback.
-
I really like this idea @wbamberg - thank you - and I agree with the proposed grouping. It's slightly out of scope of the original discussion, but I also like @teoli2003 suggestion for replacing xref stuff with github links, I think we're getting to the stage where it's starting to make sense to have markdown links over the macros. However this should be considered as a separate task and a discussion that should involve @mdn/core-dev Aside - we're starting work on a roadmap at the moment, so I'm going to reference this in that work |
Beta Was this translation helpful? Give feedback.
-
I don't know where Note there are very few functions, if any, are under |
Beta Was this translation helpful? Give feedback.
-
Been thinking about this. and looking forward to it.
with prefixed features nested in subdirectories, so:
where:
There should NOT be a top-level function directory, as function notation is found in selectors and values |
Beta Was this translation helpful? Give feedback.
-
The structure of the CSS documentation isn't very clear. I think it its original conception the docs had a (completely?) flat directory structure, and macros relied entirely on tags to organize them. Over time subdirectories have been added, but it's still mostly flat.
In general this makes it hard to see what we have, or how our docs are organized. Which module pages do we have? Which are missing? Which CSS function pages do we have? It's hard to get a quick answer to this.
It also causes specific problems when features in different parts of the language have the same name. For example, we have the
color
property and the<color>
data type: because they have the same (normalized) name, we have to have a_value
suffix on the data type:https://developer.mozilla.org/en-US/docs/Web/CSS/color
https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
Not all data types get this suffix, only those that happen to have another language feature that has the same name:
https://developer.mozilla.org/en-US/docs/Web/CSS/image <- no suffix
https://developer.mozilla.org/en-US/docs/Web/CSS/position_value <- oops, need a suffix!
Similarly we have the
fit-content
keyword and thefit-content()
function:https://developer.mozilla.org/en-US/docs/web/css/fit-content
https://developer.mozilla.org/en-US/docs/web/css/fit-content_function
...and again it is hard to predict which functions will get the
_function
suffix.Proposal
To begin with I'd like to propose the following hierarchy, based on (but slightly simplifying) the set of CSS page types: https://developer.mozilla.org/en-US/docs/MDN/Writing_guidelines/Page_structures/Page_types/Page_type_key#css_page_types
The rest of the pages are all guide pages or landing pages, and could stay where they are (there is often a sensible hierarchy there already, e.g. https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout#guides).
We'd have to figure out how to update all the macros so this still works. In particular this would break
cssxref
.Beta Was this translation helpful? Give feedback.
All reactions