richie-education 2.30.0 → 2.30.1-dev1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "richie-education",
3
- "version": "2.30.0",
3
+ "version": "2.30.1-dev1",
4
4
  "description": "A CMS to build learning portals for Open Education",
5
5
  "main": "sandbox/manage.py",
6
6
  "scripts": {
@@ -1,3 +1,6 @@
1
+ $r-section-grid-sizes: () !default;
2
+ $r-section-grid-gutters: () !default;
3
+
1
4
  section {
2
5
  // Ensure caesura always takes full width with some space around
3
6
  // within flex grid
@@ -70,6 +73,9 @@ section {
70
73
  }
71
74
  }
72
75
  }
76
+
77
+ // Enable CSS grid
78
+ @include m-o-grid($r-section-grid-sizes, $r-section-grid-gutters);
73
79
  }
74
80
 
75
81
  //
@@ -127,6 +133,9 @@ section {
127
133
  }
128
134
  }
129
135
 
136
+ // Enable CSS grid
137
+ @include m-o-grid($r-section-grid-sizes, $r-section-grid-gutters);
138
+
130
139
  .category-glimpse {
131
140
  @include sv-flex(1, 0, calc(15% - 1rem));
132
141
  max-width: none;
@@ -165,3 +165,20 @@ $r-search-filters-gutter: 0.2rem !default;
165
165
  $r-ease-in: cubic-bezier(0.5, 0, 0.75, 0) !default;
166
166
  $r-ease-out: cubic-bezier(0.25, 1, 0.5, 1) !default;
167
167
  $r-ease-in-out: cubic-bezier(0.76, 0, 0.24, 1) !default;
168
+
169
+ // Define the grid column template for Section grid
170
+ // Each item will be a variant to allow on grid
171
+ $r-section-grid-sizes: (
172
+ '50x50': 1fr 1fr,
173
+ '33x33x33': 1fr 1fr 1fr,
174
+ '25x75': 25% 2fr,
175
+ '75x25': 2fr 25%,
176
+ );
177
+
178
+ // Define gutter size to apply on Section grid
179
+ // Each item is a breakpoint where to apply the gutter, breakpoint 'sm' is used as
180
+ // the default gutter size for minimal breakpoint if defined
181
+ $r-section-grid-gutters: (
182
+ 'sm': 0.5rem,
183
+ 'xl': 1rem,
184
+ );
@@ -0,0 +1,50 @@
1
+ // Basic CSS grid
2
+
3
+ // Define CSS grid rules for content
4
+ @mixin m-o-grid($grid-sizes, $grid-gutters) {
5
+ // CSS grid definition
6
+ &__grid {
7
+ display: grid;
8
+ grid-template-columns: 100%;
9
+
10
+ // Neutralize and adapt some rules that for content items that can define some
11
+ // rules which conflict with expected section grid behaviors
12
+ & > * {
13
+ min-width: auto !important;
14
+ max-width: none !important;
15
+ }
16
+
17
+ // Adjust button caesura
18
+ & > .button-caesura {
19
+ display: block;
20
+ }
21
+
22
+ // Enable column size only for large screen and up
23
+ @include media-breakpoint-up(lg) {
24
+ @each $key, $value in $r-section-grid-sizes {
25
+ &--#{$key} {
26
+ grid-template-columns: $value;
27
+ }
28
+ }
29
+ }
30
+
31
+ // Variants with a gutter between content items
32
+ &--with-gutter {
33
+ @if map-get($r-section-grid-gutters, 'sm') {
34
+ column-gap: map-get($r-section-grid-gutters, 'sm');
35
+ row-gap: map-get($r-section-grid-gutters, 'sm');
36
+ }
37
+ @each $key, $value in $r-section-grid-gutters {
38
+ @include media-breakpoint-up($key) {
39
+ column-gap: $value;
40
+ row-gap: $value;
41
+ }
42
+ }
43
+
44
+ // Disable contents margin in profit of grid gutter
45
+ & > * {
46
+ margin: 0 !important;
47
+ }
48
+ }
49
+ }
50
+ }
@@ -7,6 +7,7 @@
7
7
  @import './empty';
8
8
  @import './features';
9
9
  @import './flexbox';
10
+ @import './grids';
10
11
  @import './hero';
11
12
  @import './keyframes';
12
13
  @import './list-group';