CSS items should only belong to a single group
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- css, javascript
- Área
- documentation
Línea de trabajo
Comienza revisando css/properties.json y la propiedad groups documentada en css/properties.md; después, inspecciona cómo CSSRef.ejs consume los datos de grupos. Primero resuelve si se aceptan el modelo de un solo grupo y la migración por etapas; para completar el trabajo serían necesarios los cambios acordados en los datos y el consumidor, sin barras laterales de CSS incoherentes.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
@rachelandrew is working on sorting out the MDN docs on grid/flexbox/box alignment, and pointed out that the sidebars for these items don't make sense. It seems that part of the reason for this is that some of these items are marked as belonging to multiple "groups" in the metadata. I'd like to propose that we change the data so as to only allow an item to belong to a single group.
CSS data contains a property groups. The docs say:
groups(array of unique strings with at least 1 entry): CSS is organized in modules like "CSS Fonts" or "CSS Animations". MDN organizes features in these groups as well —groupsshould contain the name of the module(s) the property is defined in.
In most cases, groups only contains a single item, but in a few cases it contains more than one. For example, break-after:
"groups": [
"CSS Columns",
"CSS Fragmentation",
"CSS Regions"
]
Unfortunately the macro used to build CSS sidebars on MDN, CSSRef.efs, isn't very good at dealing with this situation, and the sidebars tend to come out incoherent. Here's the structure of the sidebar for column-gap, with annotations to show its problems:
CSS
CSS Reference
CSS Columns <- this menu item has no children
CSS Box Alignment
-> Guides
-> Using multi-column layouts <- this should not be under box alignment
-> Box Alignment In Grid Layout
-> Box Alignment in Flexbox
-> Box Alignment in Multi-column Layout
-> Properties
-> break-after
-> break-before <- this should not be under box alignment, but it's here because of [this](https://github.com/mdn/data/blob/master/css/properties.json#L3315)
...
-> column-count <- neither should this
...
-> column-gap (grid-column-gap)
...
We could fix the macro here to handle multiple group better, but I'm starting to think that we would be better to say an item can only belong to a single group. If an item can only belong to one group, then the semantics are clear: it belongs to the group (aka module) whose spec currently defines it. If its definition moves from one spec to another (as, for example, align-items moving from flexbox to box alignment) then the group changes.
We could do this in the following stages:
- clean the data so the
groupsarray contains only one group. This would fix the sidebars, while not breaking any client which expectsgroupsto be an array. - add a new property
modulewhich is a single string, and deprecategroups. - update any code that uses
groups, to usemoduleinstead - remove
groups
What do you think?
- do you think only having one "group" is a good change?
- do you currently use
groups, and if so, are you able to update?
- Lenguaje dominante
- JavaScript
- Estrellas
- 786
- Forks
- 216
- Merge medio
- 22 h 24 min
- PR fusionados (30 d)
- 4
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de mdn/data
-
Computed value for CSS animation's animation-timeline componentQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
mdn/data#1096 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Missing CSS gaps dataAbiertoneeds triage
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
Los mantenedores suelen responder en 1 día
-
accepting PR
Dificultad 1/5 Menos de una hora Aptitud para principiantes 55/100
Los mantenedores suelen responder en 1 día
-
idle needs triage
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
Proposal: Remove IE-only featuresQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertoidle
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
mdn/data#837 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 80/100
kentcdodds/kcd-skills#32 ·
-
good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
tech-debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
enhancement frontend good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 2 días
-
[推荐] SubtitleMedicAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100