@obosbbl/grunnmuren-tailwind 2.4.6 → 2.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/tailwind-base.css +36 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@obosbbl/grunnmuren-tailwind",
3
- "version": "2.4.6",
3
+ "version": "2.4.7",
4
4
  "description": "Grunnmuren Tailwind preset",
5
5
  "license": "MIT",
6
6
  "repository": {
package/tailwind-base.css CHANGED
@@ -120,22 +120,48 @@
120
120
  /** Grid container that applies the grid columns, grid spacing and the container component class */
121
121
  @utility layout-grid-container {
122
122
  @apply layout-grid container;
123
- /** Make content of the grid span the mid 12 columns as a default (unless it has another explicit col-span class) */
123
+ /**
124
+ * Make content of the grid span the mid 12 columns as a default,
125
+ * unless the child has an explicit col-span or col-end class.
126
+ *
127
+ * We use ^= (starts with) and *= ' ' (space-preceded) to only match classes
128
+ * that apply to the element itself, not descendant selectors like *:col-span-* or **:col-span-*.
129
+ */
124
130
  &
125
- > *:not([class^='col-span-']):not([class^='col-end-']):not([class*=' col-span-']):not(
126
- [class*=' col-end-']
127
- ):not([class*=' sm:col-span-']):not([class*=' sm:col-end-']):not([class^='sm:col-span-']):not(
128
- [class^='sm:col-end-']
131
+ > *:not(
132
+ :where(
133
+ [class^='col-span'],
134
+ [class*=' col-span'],
135
+ [class^='col-end'],
136
+ [class*=' col-end'],
137
+ [class^='sm:col-span'],
138
+ [class*=' sm:col-span'],
139
+ [class^='sm:col-end'],
140
+ [class*=' sm:col-end'],
141
+
142
+ )
129
143
  ) {
130
144
  @apply sm:col-span-12;
131
145
  }
132
146
 
147
+ /**
148
+ * Default col-start for grid children.
149
+ * Apply sm:col-start-2 unless the child has an explicit col-start or col-span-full class.
150
+ */
133
151
  &
134
- > *:not([class^='col-start-']):not([class^='col-span-full']):not([class*=' col-start-']):not(
135
- [class*=' col-span-full']
136
- ):not([class*=' sm:col-start-']):not([class*=' sm:col-span-full']):not(
137
- [class^='sm:col-start-']
138
- ):not([class^='sm:col-span-full']) {
152
+ > *:not(
153
+ :where(
154
+ [class^='col-start'],
155
+ [class*=' col-start'],
156
+ [class^='col-span-full'],
157
+ [class*=' col-span-full'],
158
+ [class^='sm:col-start'],
159
+ [class*=' sm:col-start'],
160
+ [class^='sm:col-span-full'],
161
+ [class*=' sm:col-span-full'],
162
+
163
+ )
164
+ ) {
139
165
  @apply sm:col-start-2;
140
166
  }
141
167
  }