first-child:
Selects an element that is the first child of its parent. The element must
be the very first child of its parent, regardless of its type.
first-of-type:
Selects the first element of its type among its siblings. The element must
be the first of its type (e.g., <p>, <div>, etc.) within its parent, but it
does *not* have to be the first child.
Makes the CSS usage more robust if the layout changes and new html elements
are added.
Signed-off-by: Florian Eckert <[email protected]>
justify-content: space-between;
}
-.modal .button-row > :not(:last-child) {
+.modal .button-row > button:not(:first-of-type) {
margin-right: .5em;
}
-.modal .button-row > :first-child {
+.modal .button-row > button:first-of-type {
margin-right: auto;
}