energy-foundations 2.3.0 → 2.5.0-beta.0
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.
- package/README.md +10 -0
- package/dist/energy-foundations.css +1 -1
- package/dist/foundations/_grid.scss +36 -0
- package/dist/generated/icon-layers.js +1 -1
- package/dist/generated/icon-layers.ts +1 -1
- package/dist/generated/icon-names.js +1 -1
- package/dist/generated/icon-names.ts +1 -1
- package/dist/index.css +264 -17
- package/dist/mixins/_layout.scss +1 -1
- package/dist/mixins/_typography.scss +19 -4
- package/dist/style.css +264 -17
- package/dist/variables/_grid.scss +6 -0
- package/dist/variables/_layout.scss +6 -1
- package/dist/variables/_typography.scss +7 -7
- package/dist/variables.css +5 -5
- package/llms/00-installation.md +125 -55
- package/llms/01-classes.md +18 -20
- package/llms/02-css-variables.md +5 -5
- package/llms/04-layouts.md +340 -0
- package/llms/index.md +3 -0
- package/package.json +5 -4
- package/src/foundations/_grid.scss +36 -0
- package/src/generated/icon-layers.js +1 -1
- package/src/generated/icon-layers.ts +1 -1
- package/src/generated/icon-names.js +1 -1
- package/src/generated/icon-names.ts +1 -1
- package/src/mixins/_layout.scss +1 -1
- package/src/mixins/_typography.scss +19 -4
- package/src/variables/_grid.scss +6 -0
- package/src/variables/_layout.scss +6 -1
- package/src/variables/_typography.scss +7 -7
- package/src/variables.css +5 -5
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
# Layouts A/B, Grid e integración Vue/AEM
|
|
2
|
+
|
|
3
|
+
Layout A es el valor por defecto y Layout B es editorial y opt-in. No migres portales existentes ni cambies sus breakpoints sin una petición explícita.
|
|
4
|
+
|
|
5
|
+
## Contrato de página
|
|
6
|
+
|
|
7
|
+
| Perfil | Contexto tipográfico | Contenedor | Grid |
|
|
8
|
+
|---|---|---|---|
|
|
9
|
+
| A | body sin atributo data-rds-layout | .rds-layout-max | .rds-grid |
|
|
10
|
+
| B | body[data-rds-layout="b"] | .rds-layout-editorial | .rds-grid-editorial |
|
|
11
|
+
|
|
12
|
+
Estas tres capas son independientes. Un contenedor editorial local no activa el contexto tipográfico B. Los helpers rds-col-* y Flex responsive siguen usando los cortes de A; no los trates como helpers B.
|
|
13
|
+
|
|
14
|
+
Solo la página o el shell controla el atributo global. Dos perfiles tipográficos simultáneos requieren un contexto local diseñado expresamente; no alternes el body desde componentes individuales.
|
|
15
|
+
|
|
16
|
+
## API y breakpoints
|
|
17
|
+
|
|
18
|
+
### Breakpoints Sass
|
|
19
|
+
|
|
20
|
+
A Layout A Breakpoints default
|
|
21
|
+
`mobile`: max-width: 719px
|
|
22
|
+
`tablet`: min-width: 720px
|
|
23
|
+
`desktop`: min-width: 1280px
|
|
24
|
+
`desktop-large`: min-width: 1440px
|
|
25
|
+
`ultrawide`: min-width: 1600px
|
|
26
|
+
B Layout B Breakpoints editoriales
|
|
27
|
+
`mobile-v2`: max-width: 799px
|
|
28
|
+
`tablet-v2`: min-width: 800px
|
|
29
|
+
`desktop-v2`: min-width: 1024px
|
|
30
|
+
`desktop-large-v2`: min-width: 1250px
|
|
31
|
+
`ultrawide-v2`: min-width: 1584px
|
|
32
|
+
|
|
33
|
+
Los nombres `*-v2` se conservan por compatibilidad. Representan los breakpoints de Layout B.
|
|
34
|
+
|
|
35
|
+
```scss
|
|
36
|
+
.component {
|
|
37
|
+
// Mobile first
|
|
38
|
+
|
|
39
|
+
@include breakpoint(tablet) {
|
|
40
|
+
// Layout A desde 720px
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@include breakpoint(tablet-v2) {
|
|
44
|
+
// Layout B desde 800px
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Contenedores
|
|
50
|
+
|
|
51
|
+
LEGACY
|
|
52
|
+
`.rds-e-layout-max`
|
|
53
|
+
Alias compatible de `.rds-layout-max`.
|
|
54
|
+
LAYOUT A
|
|
55
|
+
`.rds-layout-max`
|
|
56
|
+
Padding 16px mobile, 24px tablet y 32px desktop. Máximo 1600px.
|
|
57
|
+
LAYOUT B
|
|
58
|
+
`.rds-layout-editorial`
|
|
59
|
+
Padding progresivo hasta 72px. Máximo editorial de 1584px.
|
|
60
|
+
|
|
61
|
+
### Riesgo: doble fuente de verdad
|
|
62
|
+
|
|
63
|
+
El contexto tipográfico del `body` y las clases de contenedor y grid son independientes. La librería no detecta ni corrige automáticamente las combinaciones incoherentes.
|
|
64
|
+
|
|
65
|
+
#### Caso incoherente: tipografía B con maquetación A
|
|
66
|
+
|
|
67
|
+
```html
|
|
68
|
+
<body data-rds-layout="b">
|
|
69
|
+
<main class="rds-layout-max">
|
|
70
|
+
<div class="rds-grid"><!-- Contenido --></div>
|
|
71
|
+
</main>
|
|
72
|
+
</body>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
La tipografía cambia a desktop desde 1024px, pero el grid no pasa a 12 columnas hasta 1280px. El contenedor conserva los márgenes de A. Por ejemplo, a 1100px se combina tipografía desktop B con el grid de 8 columnas de A.
|
|
76
|
+
|
|
77
|
+
#### Caso incoherente: tipografía A con maquetación B
|
|
78
|
+
|
|
79
|
+
```html
|
|
80
|
+
<body>
|
|
81
|
+
<main class="rds-layout-editorial">
|
|
82
|
+
<div class="rds-grid-editorial"><!-- Contenido --></div>
|
|
83
|
+
</main>
|
|
84
|
+
</body>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
El grid pasa a 12 columnas desde 1024px y el contenedor usa los márgenes de B, pero la tipografía mantiene la escala base de A hasta 1280px.
|
|
88
|
+
|
|
89
|
+
#### Composición recomendada para una página B
|
|
90
|
+
|
|
91
|
+
```html
|
|
92
|
+
<body data-rds-layout="b">
|
|
93
|
+
<main class="rds-layout-editorial">
|
|
94
|
+
<div class="rds-grid-editorial"><!-- Contenido --></div>
|
|
95
|
+
</main>
|
|
96
|
+
</body>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Para una página A, omite el atributo y combina `.rds-layout-max` con `.rds-grid`. La clase del contenedor solo controla ancho y márgenes: no crea un grid ni selecciona la tipografía.
|
|
100
|
+
|
|
101
|
+
Resuelve el perfil una sola vez en el shell de Vue o en el Page Component de AEM y deriva de esa decisión las tres capas. Al cambiar de ruta, actualiza tanto el contexto global como el contenedor y el grid del destino.
|
|
102
|
+
|
|
103
|
+
Esta composición no cambia los helpers `rds-col-*` ni Flex responsive: siguen usando los breakpoints de A. Para spans editoriales, utiliza las reglas Sass del perfil B descritas en Grid.
|
|
104
|
+
|
|
105
|
+
### Referencia de Grid
|
|
106
|
+
|
|
107
|
+
Columnas, gaps, offsets y ejemplos interactivos tienen su propia página en Layout / Grid.
|
|
108
|
+
|
|
109
|
+
### Tipografía responsive
|
|
110
|
+
|
|
111
|
+
Las clases y el mixin de tipografía leen el contexto global. No es necesario elegir un mixin distinto por layout:
|
|
112
|
+
|
|
113
|
+
```scss
|
|
114
|
+
.component__title {
|
|
115
|
+
@include rds-font-style('headline-01');
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
```html
|
|
120
|
+
<h1 class="rds-headline-01">Título responsive</h1>
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Mobile Base Ambos layouts
|
|
124
|
+
Desktop A · 1280px B · 1024px
|
|
125
|
+
Ultrawide A · 1600px B · 1584px
|
|
126
|
+
|
|
127
|
+
No existe una escala tipográfica específica para tablet. El breakpoint `desktop-large` modifica la maquetación, pero no introduce por sí mismo una nueva escala tipográfica.
|
|
128
|
+
|
|
129
|
+
## Grid: columnas, offsets y perfil editorial
|
|
130
|
+
|
|
131
|
+
### Columnas y offsets · Layout A
|
|
132
|
+
|
|
133
|
+
El perfil A usa 4 columnas con gap de 16px hasta 719px, 8 columnas con gap de 16px desde 720px y 12 columnas con gap de 24px desde 1280px.
|
|
134
|
+
El perfil B usa 4 columnas con gap de 16px hasta 799px, 8 columnas con gap de 24px desde 800px y 12 columnas con gap de 24px desde 1024px.
|
|
135
|
+
|
|
136
|
+
El patrón `rds-col-{abbr}-{n}` selecciona el span; `rds-col-{abbr}-{n}-offset-{offset}` fija el inicio en offset + 1.
|
|
137
|
+
El helper `rds-col-{n}` solo se genera en los rangos que admiten ese número de columnas: no reduce un span grande para que quepa en mobile.
|
|
138
|
+
|
|
139
|
+
No se generan aliases `sm`, `lg`, `xl` ni columnas `xd`. Las reglas `md` permanecen activas en desktop si no las sustituyes.
|
|
140
|
+
Los offsets disponibles van de cero a `máximo de columnas - n`.
|
|
141
|
+
|
|
142
|
+
```html
|
|
143
|
+
<div class="rds-layout-max">
|
|
144
|
+
<div class="rds-grid">
|
|
145
|
+
<article class="rds-col-sd-4 rds-col-md-4 rds-col-ld-6">
|
|
146
|
+
Contenido
|
|
147
|
+
</article>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
```html
|
|
153
|
+
<article class="rds-col-sd-4 rds-col-md-4-offset-2">
|
|
154
|
+
En tablet ocupa 4 columnas y empieza en la tercera.
|
|
155
|
+
</article>
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Grid editorial · Layout B
|
|
159
|
+
|
|
160
|
+
El grid editorial usa los cortes de B, pero los helpers `rds-col-*` actuales se generan con los de A.
|
|
161
|
+
Por tanto, no basta con cambiar la clase del grid para sincronizar los spans.
|
|
162
|
+
Para un componente editorial, define sus columnas con los mixins de B:
|
|
163
|
+
|
|
164
|
+
```html
|
|
165
|
+
<div class="rds-layout-editorial">
|
|
166
|
+
<div class="rds-grid-editorial">
|
|
167
|
+
<article class="portal-editorial-card">Contenido</article>
|
|
168
|
+
</div>
|
|
169
|
+
</div>
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
```scss
|
|
173
|
+
@use 'energy-foundations/src/rds-variables' as rds;
|
|
174
|
+
|
|
175
|
+
.portal-editorial-card {
|
|
176
|
+
grid-column: span 4;
|
|
177
|
+
|
|
178
|
+
@include rds.breakpoint(tablet-v2) {
|
|
179
|
+
grid-column: span 4;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
@include rds.breakpoint(desktop-v2) {
|
|
183
|
+
grid-column: span 6;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Prueba el grid
|
|
189
|
+
|
|
190
|
+
## Integración Vue: público B y privado A
|
|
191
|
+
|
|
192
|
+
### Caso habitual: público B, privado A
|
|
193
|
+
|
|
194
|
+
Una misma SPA puede utilizar Layout B en la parte pública y Layout A después del login. Se comparte el mismo bundle CSS y no es necesario que los componentes conozcan el layout.
|
|
195
|
+
|
|
196
|
+
#### 1. Declara el layout en Vue Router
|
|
197
|
+
|
|
198
|
+
```ts
|
|
199
|
+
import type { RouteRecordRaw } from 'vue-router'
|
|
200
|
+
|
|
201
|
+
type RdsLayout = 'a' | 'b'
|
|
202
|
+
|
|
203
|
+
declare module 'vue-router' {
|
|
204
|
+
interface RouteMeta {
|
|
205
|
+
rdsLayout?: RdsLayout
|
|
206
|
+
requiresAuth?: boolean
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export const routes: RouteRecordRaw[] = [
|
|
211
|
+
{
|
|
212
|
+
path: '/',
|
|
213
|
+
component: () => import('./layouts/PublicLayout.vue'),
|
|
214
|
+
meta: { rdsLayout: 'b' },
|
|
215
|
+
children: [
|
|
216
|
+
{ path: '', component: () => import('./views/HomeView.vue') },
|
|
217
|
+
{ path: 'login', component: () => import('./views/LoginView.vue') },
|
|
218
|
+
],
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
path: '/app',
|
|
222
|
+
component: () => import('./layouts/PrivateLayout.vue'),
|
|
223
|
+
meta: { rdsLayout: 'a', requiresAuth: true },
|
|
224
|
+
children: [
|
|
225
|
+
{ path: '', component: () => import('./views/DashboardView.vue') },
|
|
226
|
+
],
|
|
227
|
+
},
|
|
228
|
+
]
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Las rutas hijas heredan la metadata de la ruta padre y pueden sobrescribirla cuando exista una excepción.
|
|
232
|
+
|
|
233
|
+
#### 2. Sincroniza el `body` desde un único punto
|
|
234
|
+
|
|
235
|
+
```ts
|
|
236
|
+
import type { Router } from 'vue-router'
|
|
237
|
+
|
|
238
|
+
type RdsLayout = 'a' | 'b'
|
|
239
|
+
|
|
240
|
+
function applyRdsLayout(layout: RdsLayout): void {
|
|
241
|
+
if (layout === 'b') {
|
|
242
|
+
document.body.dataset.rdsLayout = 'b'
|
|
243
|
+
return
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
document.body.removeAttribute('data-rds-layout')
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export function installRdsLayoutSync(router: Router): void {
|
|
250
|
+
router.afterEach((to) => {
|
|
251
|
+
applyRdsLayout(to.meta.rdsLayout ?? 'a')
|
|
252
|
+
})
|
|
253
|
+
}
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
```ts
|
|
257
|
+
const router = createRouter({
|
|
258
|
+
history: createWebHistory(),
|
|
259
|
+
routes,
|
|
260
|
+
})
|
|
261
|
+
|
|
262
|
+
installRdsLayoutSync(router)
|
|
263
|
+
|
|
264
|
+
await router.isReady()
|
|
265
|
+
|
|
266
|
+
createApp(App)
|
|
267
|
+
.use(router)
|
|
268
|
+
.mount('#app')
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
#### 3. Mantén autenticación y presentación separadas
|
|
272
|
+
|
|
273
|
+
```ts
|
|
274
|
+
router.beforeEach((to) => {
|
|
275
|
+
if (to.meta.requiresAuth && !authStore.isAuthenticated) {
|
|
276
|
+
return {
|
|
277
|
+
path: '/login',
|
|
278
|
+
query: { redirect: to.fullPath },
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
})
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
El guard decide si la navegación está permitida. `afterEach` aplica el layout de la ruta finalmente confirmada. No obtengas el layout directamente de `isAuthenticated`: podría existir una página pública A o una sección autenticada B.
|
|
285
|
+
|
|
286
|
+
### Casos especiales
|
|
287
|
+
|
|
288
|
+
## Integración Adobe AEM y Catálogo Zero
|
|
289
|
+
|
|
290
|
+
### Un único propietario: el Page Component
|
|
291
|
+
|
|
292
|
+
El layout debe resolverse en el Page Component, template o policy porque esa capa controla el `body`.
|
|
293
|
+
|
|
294
|
+
```html
|
|
295
|
+
<!-- Layout A: valor por defecto -->
|
|
296
|
+
<body>
|
|
297
|
+
<main class="rds-layout-max">
|
|
298
|
+
<div class="rds-grid"><!-- Contenido --></div>
|
|
299
|
+
</main>
|
|
300
|
+
</body>
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
```html
|
|
304
|
+
<!-- Layout B: selección editorial -->
|
|
305
|
+
<body data-rds-layout="b">
|
|
306
|
+
<main class="rds-layout-editorial">
|
|
307
|
+
<div class="rds-grid-editorial"><!-- Contenido --></div>
|
|
308
|
+
</main>
|
|
309
|
+
</body>
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
La selección puede proceder del template, una Page Policy, una propiedad de página o la configuración global del portal.
|
|
313
|
+
|
|
314
|
+
### Contrato Sling Model → HTL
|
|
315
|
+
|
|
316
|
+
El Sling Model debe normalizar la configuración y exponer valores seguros y predecibles:
|
|
317
|
+
|
|
318
|
+
```html
|
|
319
|
+
<body data-rds-layout="${pageModel.rdsLayout}">
|
|
320
|
+
<main class="${pageModel.layoutContainerClass}">
|
|
321
|
+
<div class="${pageModel.gridClass}">
|
|
322
|
+
<!-- Contenido de la página -->
|
|
323
|
+
</div>
|
|
324
|
+
</main>
|
|
325
|
+
</body>
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
El modelo debe aceptar únicamente una whitelist de valores conocidos. No copies texto libre del autor directamente en atributos o clases. Para Layout A, HTL debe omitir el atributo vacío o dejarlo sin efecto.
|
|
329
|
+
|
|
330
|
+
### Catálogo Zero
|
|
331
|
+
|
|
332
|
+
Los componentes comunes y moleculares:
|
|
333
|
+
|
|
334
|
+
- No consultan la propiedad de página.
|
|
335
|
+
- No reciben un parámetro `layout` para elegir tipografía.
|
|
336
|
+
- No se duplican como componente A y componente B.
|
|
337
|
+
- Permiten que el Page Component y Foundations resuelvan el contexto.
|
|
338
|
+
|
|
339
|
+
Los componentes específicos de portal siguen el mismo contrato. Pueden usar un contenedor editorial local, pero `.rds-layout-editorial` por sí sola no cambia los breakpoints tipográficos de toda la página.
|
|
340
|
+
|
package/llms/index.md
CHANGED
|
@@ -5,6 +5,9 @@ Generated for intelligent coding assistants.
|
|
|
5
5
|
## Guides
|
|
6
6
|
|
|
7
7
|
- [Installation & Quick Start](./00-installation.md)
|
|
8
|
+
- [Layouts A/B, Grid and Vue/AEM integration](./04-layouts.md)
|
|
9
|
+
|
|
10
|
+
For responsive pages, read the layout guide first: body context controls typography, while containers and grids are explicit choices. Layout A remains the default; B is opt-in. Column and responsive Flex helpers still use A breakpoints.
|
|
8
11
|
|
|
9
12
|
## Classes
|
|
10
13
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "energy-foundations",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0-beta.0",
|
|
4
4
|
"config": {
|
|
5
5
|
"commitizen": {
|
|
6
6
|
"path": "node_modules/cz-customizable"
|
|
@@ -64,10 +64,10 @@
|
|
|
64
64
|
],
|
|
65
65
|
"lint-staged": {
|
|
66
66
|
"*.{vue,ts}": [
|
|
67
|
-
"
|
|
67
|
+
"eslint"
|
|
68
68
|
],
|
|
69
69
|
"*.scss": [
|
|
70
|
-
"
|
|
70
|
+
"stylelint"
|
|
71
71
|
],
|
|
72
72
|
"package.json": [
|
|
73
73
|
"fixpack --dryRun"
|
|
@@ -97,7 +97,8 @@
|
|
|
97
97
|
"storybook": "storybook dev -p 6006",
|
|
98
98
|
"storybook:preview": "npx http-server storybook-static",
|
|
99
99
|
"stylelint": "npx stylelint '**/*.scss'",
|
|
100
|
-
"stylelint:fix": "npx stylelint '**/*.scss' --fix"
|
|
100
|
+
"stylelint:fix": "npx stylelint '**/*.scss' --fix",
|
|
101
|
+
"test:typography": "node tests/verify-typography.mjs"
|
|
101
102
|
},
|
|
102
103
|
"style": "dist/style.css",
|
|
103
104
|
"type": "module"
|
|
@@ -23,6 +23,28 @@
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
.rds-layout-editorial {
|
|
27
|
+
padding: 0 $g-padding-mobile;
|
|
28
|
+
|
|
29
|
+
@include breakpoint(tablet-v2) {
|
|
30
|
+
padding: 0 $g-padding-tablet;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@include breakpoint(desktop-v2) {
|
|
34
|
+
padding: 0 $g-padding-desktop;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@include breakpoint(desktop-large-v2) {
|
|
38
|
+
padding: 0 72px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@include breakpoint(ultrawide-v2) {
|
|
42
|
+
margin: 0 auto;
|
|
43
|
+
max-width: 1584px;
|
|
44
|
+
padding: 0 72px;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
26
48
|
.rds-grid {
|
|
27
49
|
display: grid;
|
|
28
50
|
margin-left: auto;
|
|
@@ -37,6 +59,20 @@
|
|
|
37
59
|
}
|
|
38
60
|
}
|
|
39
61
|
|
|
62
|
+
.rds-grid-editorial {
|
|
63
|
+
display: grid;
|
|
64
|
+
margin-left: auto;
|
|
65
|
+
margin-right: auto;
|
|
66
|
+
width: 100%;
|
|
67
|
+
|
|
68
|
+
@each $breakpoint, $config in $grid-config-editorial {
|
|
69
|
+
@include breakpoint($breakpoint) {
|
|
70
|
+
gap: map.get($config, gap);
|
|
71
|
+
grid-template-columns: repeat(map.get($config, max-columns), 1fr);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
40
76
|
// Map of breakpoint names to abbreviations
|
|
41
77
|
$breakpoint-abbr: (
|
|
42
78
|
mobile: sd,
|
package/src/mixins/_layout.scss
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
// Include font styles.
|
|
37
|
+
// Include font styles. Mobile, Desktop or responsive.
|
|
38
38
|
// use:
|
|
39
39
|
// .element {
|
|
40
40
|
// @include rds-font-style(rds-typography-headline-1);
|
|
@@ -70,10 +70,8 @@
|
|
|
70
70
|
|
|
71
71
|
@mixin rds-font-style($name) {
|
|
72
72
|
@if map.has-key($rds-types-fluid, $name) {
|
|
73
|
-
|
|
74
73
|
@include rds-font-style-sd($name);
|
|
75
74
|
|
|
76
|
-
|
|
77
75
|
@include breakpoint(tablet) {
|
|
78
76
|
@include rds-font-style-md($name);
|
|
79
77
|
}
|
|
@@ -85,7 +83,24 @@
|
|
|
85
83
|
@include breakpoint(ultrawide) {
|
|
86
84
|
@include rds-font-style-xd($name);
|
|
87
85
|
}
|
|
88
|
-
|
|
86
|
+
|
|
87
|
+
:where(body[data-rds-layout='b']) & {
|
|
88
|
+
@include breakpoint(tablet) {
|
|
89
|
+
@include rds-font-style-sd($name);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@include breakpoint(tablet-v2) {
|
|
93
|
+
@include rds-font-style-md($name);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@include breakpoint(desktop-v2) {
|
|
97
|
+
@include rds-font-style-ld($name);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@include breakpoint(ultrawide-v2) {
|
|
101
|
+
@include rds-font-style-xd($name);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
89
104
|
} @else {
|
|
90
105
|
@include rds-font-style-sd($name);
|
|
91
106
|
}
|
package/src/variables/_grid.scss
CHANGED
|
@@ -5,6 +5,12 @@ $grid-config: (
|
|
|
5
5
|
desktop: (max-columns: 12, gap: 24px)
|
|
6
6
|
) !default;
|
|
7
7
|
|
|
8
|
+
$grid-config-editorial: (
|
|
9
|
+
mobile-v2: (max-columns: 4, gap: 16px),
|
|
10
|
+
tablet-v2: (max-columns: 8, gap: 24px),
|
|
11
|
+
desktop-v2: (max-columns: 12, gap: 24px)
|
|
12
|
+
) !default;
|
|
13
|
+
|
|
8
14
|
$g-padding-mobile: 16px;
|
|
9
15
|
$g-padding-tablet: 24px;
|
|
10
16
|
$g-padding-desktop: 32px;
|
|
@@ -16,5 +16,10 @@ $breakpoints: (
|
|
|
16
16
|
tablet: $bp-tablet,
|
|
17
17
|
desktop: $bp-desktop,
|
|
18
18
|
desktop-large: $bp-desktop-large,
|
|
19
|
-
ultrawide: $bp-ultrawide
|
|
19
|
+
ultrawide: $bp-ultrawide,
|
|
20
|
+
mobile-v2: 799px,
|
|
21
|
+
tablet-v2: 800px,
|
|
22
|
+
desktop-v2: 1024px,
|
|
23
|
+
desktop-large-v2: 1250px,
|
|
24
|
+
ultrawide-v2: 1584px
|
|
20
25
|
) !default;
|
|
@@ -56,7 +56,7 @@ $rds-typography-body-01-bold: (
|
|
|
56
56
|
);
|
|
57
57
|
|
|
58
58
|
$rds-typography-body-01-underline: (
|
|
59
|
-
font: #{calc(16 / $f-base) + rem} / #{calc(
|
|
59
|
+
font: #{calc(16 / $f-base) + rem} / #{calc(24 / $f-base) + rem} $rds-typography-f-text,
|
|
60
60
|
);
|
|
61
61
|
|
|
62
62
|
$rds-typography-body-02: (
|
|
@@ -124,7 +124,7 @@ $rds-typography-headline-00: (
|
|
|
124
124
|
font: #{calc(40 / $f-base) + rem} / #{calc(48 / $f-base) + rem} $rds-typography-f-headline
|
|
125
125
|
),
|
|
126
126
|
md: (
|
|
127
|
-
font: #{calc(
|
|
127
|
+
font: #{calc(40 / $f-base) + rem} / #{calc(48 / $f-base) + rem} $rds-typography-f-headline
|
|
128
128
|
),
|
|
129
129
|
ld: (
|
|
130
130
|
font: #{calc(64 / $f-base) + rem} / #{calc(80 / $f-base) + rem} $rds-typography-f-headline
|
|
@@ -139,7 +139,7 @@ $rds-typography-headline-01: (
|
|
|
139
139
|
font: #{calc(32 / $f-base) + rem} / #{calc(40 / $f-base) + rem} $rds-typography-f-headline
|
|
140
140
|
),
|
|
141
141
|
md: (
|
|
142
|
-
font: #{calc(
|
|
142
|
+
font: #{calc(32 / $f-base) + rem} / #{calc(40 / $f-base) + rem} $rds-typography-f-headline
|
|
143
143
|
),
|
|
144
144
|
ld: (
|
|
145
145
|
font: #{calc(48 / $f-base) + rem} / #{calc(60 / $f-base) + rem} $rds-typography-f-headline
|
|
@@ -155,7 +155,7 @@ $rds-typography-headline-02: (
|
|
|
155
155
|
font: #{calc(28 / $f-base) + rem} / #{calc(36 / $f-base) + rem} $rds-typography-f-headline
|
|
156
156
|
),
|
|
157
157
|
md: (
|
|
158
|
-
font: #{calc(
|
|
158
|
+
font: #{calc(28 / $f-base) + rem} / #{calc(36 / $f-base) + rem} $rds-typography-f-headline
|
|
159
159
|
),
|
|
160
160
|
ld: (
|
|
161
161
|
font: #{calc(36 / $f-base) + rem} / #{calc(48 / $f-base) + rem} $rds-typography-f-headline
|
|
@@ -170,7 +170,7 @@ $rds-typography-headline-03: (
|
|
|
170
170
|
font: #{calc(22 / $f-base) + rem} / #{calc(30 / $f-base) + rem} $rds-typography-f-headline
|
|
171
171
|
),
|
|
172
172
|
md: (
|
|
173
|
-
font: #{calc(
|
|
173
|
+
font: #{calc(22 / $f-base) + rem} / #{calc(30 / $f-base) + rem} $rds-typography-f-headline
|
|
174
174
|
),
|
|
175
175
|
ld: (
|
|
176
176
|
font: #{calc(28 / $f-base) + rem} / #{calc(36 / $f-base) + rem} $rds-typography-f-headline
|
|
@@ -265,9 +265,9 @@ $rds-types-all: (
|
|
|
265
265
|
caption-tag: $rds-typography-caption-tag,
|
|
266
266
|
body-01: $rds-typography-body-01,
|
|
267
267
|
body-02: $rds-typography-body-02,
|
|
268
|
-
body-01-bold: $rds-typography-body-01-
|
|
268
|
+
body-01-bold: $rds-typography-body-01-bold,
|
|
269
269
|
body-01-underline: $rds-typography-body-01-underline,
|
|
270
|
-
body-02-bold: $rds-typography-body-02-
|
|
270
|
+
body-02-bold: $rds-typography-body-02-bold,
|
|
271
271
|
body-02-underline: $rds-typography-body-02-underline,
|
|
272
272
|
button-01: $rds-typography-button-01,
|
|
273
273
|
button-02: $rds-typography-button-02,
|
package/src/variables.css
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
--rds-body-01: 1rem/1.5rem RepsolSoleTextRegular;
|
|
29
29
|
--rds-body-02: 0.875rem/1.25rem RepsolSoleTextRegular;
|
|
30
30
|
--rds-body-01-bold: 1rem/1.5rem RepsolSoleTextBold;
|
|
31
|
-
--rds-body-01-underline: 1rem/1.
|
|
31
|
+
--rds-body-01-underline: 1rem/1.5rem RepsolSoleTextRegular;
|
|
32
32
|
--rds-body-02-bold: 0.875rem/1.25rem RepsolSoleTextBold;
|
|
33
33
|
--rds-body-02-underline: 0.875rem/1.25rem RepsolSoleTextRegular;
|
|
34
34
|
--rds-button-01: 1rem/1.5rem RepsolSoleTextBold;
|
|
@@ -44,19 +44,19 @@
|
|
|
44
44
|
--rds-title-01: 1.125rem/1.625rem RepsolSoleTextBold;
|
|
45
45
|
--rds-title-02: 1rem/1.5rem RepsolSoleTextBold;
|
|
46
46
|
--rds-headline-00-sd: 2.5rem/3rem RepsolSoleDisplayRegular;
|
|
47
|
-
--rds-headline-00-md:
|
|
47
|
+
--rds-headline-00-md: 2.5rem/3rem RepsolSoleDisplayRegular;
|
|
48
48
|
--rds-headline-00-ld: 4rem/5rem RepsolSoleDisplayRegular;
|
|
49
49
|
--rds-headline-00-xd: 4.5rem/5.75rem RepsolSoleDisplayRegular;
|
|
50
50
|
--rds-headline-01-sd: 2rem/2.5rem RepsolSoleDisplayRegular;
|
|
51
|
-
--rds-headline-01-md: 2.5rem
|
|
51
|
+
--rds-headline-01-md: 2rem/2.5rem RepsolSoleDisplayRegular;
|
|
52
52
|
--rds-headline-01-ld: 3rem/3.75rem RepsolSoleDisplayRegular;
|
|
53
53
|
--rds-headline-01-xd: 3.5rem/4.25rem RepsolSoleDisplayRegular;
|
|
54
54
|
--rds-headline-02-sd: 1.75rem/2.25rem RepsolSoleDisplayRegular;
|
|
55
|
-
--rds-headline-02-md:
|
|
55
|
+
--rds-headline-02-md: 1.75rem/2.25rem RepsolSoleDisplayRegular;
|
|
56
56
|
--rds-headline-02-ld: 2.25rem/3rem RepsolSoleDisplayRegular;
|
|
57
57
|
--rds-headline-02-xd: 2.75rem/3.5rem RepsolSoleDisplayRegular;
|
|
58
58
|
--rds-headline-03-sd: 1.375rem/1.875rem RepsolSoleDisplayRegular;
|
|
59
|
-
--rds-headline-03-md: 1.
|
|
59
|
+
--rds-headline-03-md: 1.375rem/1.875rem RepsolSoleDisplayRegular;
|
|
60
60
|
--rds-headline-03-ld: 1.75rem/2.25rem RepsolSoleDisplayRegular;
|
|
61
61
|
--rds-headline-03-xd: 2rem/2.5rem RepsolSoleDisplayRegular;
|
|
62
62
|
--rds-headline-04-sd: 1.125rem/1.625rem RepsolSoleDisplayRegular;
|