1 |
efrain |
1 |
This file describes API changes in /theme/boost
|
|
|
2 |
information provided here is intended especially for theme designers.
|
|
|
3 |
|
|
|
4 |
=== 4.4 ===
|
|
|
5 |
* Bootstrap badge color helper clases (badge-[primary|secondary|...]) are no longer used, use bg-[primary|secondary|...] instead.
|
|
|
6 |
* Bootstrap badge-pill is no longer used, use rounded-pill instead.
|
|
|
7 |
* The bootstrap ´.media´ helper class has been replaced with utility classes (´d-flex´, ´flex-shrink-´, ´flex-grow-´, ...)
|
|
|
8 |
* The following bootstrap mixins that will be deprecated in BS5 have been replaced with their CSS code:
|
|
|
9 |
- hover, hover-focus, plain-hover-focus and hover-focus-active
|
|
|
10 |
- float-left, float-right and float-none
|
|
|
11 |
- nav-divider
|
|
|
12 |
- img-retina
|
|
|
13 |
- text-hide
|
|
|
14 |
- invisible
|
|
|
15 |
- form-control-focus
|
|
|
16 |
- text-emphasis-variant
|
|
|
17 |
- size
|
|
|
18 |
- make-container-max-widths
|
|
|
19 |
- g-variant and bg-gradient-variant
|
|
|
20 |
* Bootstrap `.form-group` helper class is no longer used, use margin utilities instead (´mb-3´, ...).
|
|
|
21 |
* Bootstrap `.form-inline` helper class is no longer used, use display utilities instead (`.d-flex.flex-wrap.align-items-center`).
|
|
|
22 |
* The `.dashboard-card` class has been removed in favour of `.course-card` and `theme-card`.
|
|
|
23 |
* Bootstrap `.card-deck` helper class is no longer used, use grid utility classes (row, row-cols, ...) instead.
|
|
|
24 |
|
|
|
25 |
=== 4.3 ===
|
|
|
26 |
* The $activity-iconcontainer-height and $activity-iconcontainer-width variables have been changed from 50px to 52px.
|
|
|
27 |
* New SCSS mixin optional_animate to animate an element unless if the user has reduced motion in their preferences.
|
|
|
28 |
|
|
|
29 |
=== 4.0 ===
|
|
|
30 |
* Following the adopted standards, breadcrumbs have been removed for pages that reside on the 1st level within a course
|
|
|
31 |
e.g. participants, grades, settings, reports.
|
|
|
32 |
* Any custom complex node structures added to the nav tree will now be displayed as a flattened structure within the corresponding
|
|
|
33 |
secondary navigation. It is dependent on what the first url for the construct.
|
|
|
34 |
Refer to secondary_test.php:test_add_external_nodes_to_secondary for examples.
|
|
|
35 |
* New function addblockbutton in the renderer, which generates the new 'Add a block' button.
|
|
|
36 |
Call this and output it into your templates.
|
|
|
37 |
* In order to view additional custom nodes, leverage the 'get_overflow_menu_data' which returns url_select if there are nodes available.
|
|
|
38 |
* In order for existing themes to leverage the changes in the Boost theme, it is recommended to follow the guidelines in the 4.0 docs
|
|
|
39 |
https://moodledev.io/docs/4.1/devupdate
|
|
|
40 |
|
|
|
41 |
=== 3.7 ===
|
|
|
42 |
|
|
|
43 |
* Templates and renderers moved to core.
|
|
|
44 |
|
|
|
45 |
* Behat override steps moved to core.
|
|
|
46 |
|
|
|
47 |
Form element template
|
|
|
48 |
---------------------
|
|
|
49 |
A 'wrapperid' has been added to 'templates/core_form/element-template.mustache' to restore unique ids
|
|
|
50 |
on Boost form element wrappers. This restores the same unique element ids seen on elements in BS2
|
|
|
51 |
themes, which were mistakenly dropped when introducing the Boost theme.
|
|
|
52 |
|
|
|
53 |
=== 3.5 ===
|
|
|
54 |
|
|
|
55 |
The Boost theme now uses Bootstrap 4 Stable (BS4S).
|
|
|
56 |
|
|
|
57 |
We are trying to use as much BS4S classes in MDL Templates to reduce the amount of Moodle CSS.
|
|
|
58 |
|
|
|
59 |
The biggest changes are:
|
|
|
60 |
|
|
|
61 |
JavaScript
|
|
|
62 |
----------
|
|
|
63 |
* All Bootstrap javascript has been updated.
|
|
|
64 |
|
|
|
65 |
Sass
|
|
|
66 |
----
|
|
|
67 |
* A number of variables are no longer available in Bootstrap 4 Stable. For now a bs4alpha compatibility file has been added, see scss/bs4alphacompat.scss which translates veriable names from the Alpha version to the stable version.
|
|
|
68 |
|
|
|
69 |
* m-t-* and other spacing utilities should be replaced with mt-*.
|
|
|
70 |
|
|
|
71 |
The units that were used for margins have changed too
|
|
|
72 |
m-t-1 is now mt-3
|
|
|
73 |
m-t-2 is now mt-4
|
|
|
74 |
m-t-3 is now mt-5
|
|
|
75 |
|
|
|
76 |
|
|
|
77 |
Grid and Flexbox
|
|
|
78 |
----------------
|
|
|
79 |
The Boostrap grid uses CSS's flexbox grid to build layouts.
|
|
|
80 |
|
|
|
81 |
New breakpoints for grids have been added:
|
|
|
82 |
.col-* <576px
|
|
|
83 |
.col-sm-* >= 576px
|
|
|
84 |
.col-md-* >= 768px
|
|
|
85 |
.col-lg-* >= 992px
|
|
|
86 |
.col-xl-* >= 1200px
|
|
|
87 |
|
|
|
88 |
All usage of '*-xs-*' have been dropped. So what used to be col-xs-6 should now be written as col-6.
|
|
|
89 |
|
|
|
90 |
*-md-* has become *-lg-*, and *-lg-* has become *-xl-*.
|
|
|
91 |
|
|
|
92 |
Typography
|
|
|
93 |
----------
|
|
|
94 |
Boostrap 4 uses a native font stack that selects the best font-family for each OS and device. For font sizing the browser default root font-size (typically 16px) is used. this variable can be changed using the variable '$font-size-base'.
|
|
|
95 |
In the default Boost preset we use: "0.9375rem" which computes to 15px on most browser.
|
|
|
96 |
|
|
|
97 |
Presets
|
|
|
98 |
-------
|
|
|
99 |
The structure of preset files have changed. The new structure of a preset file is:
|
|
|
100 |
|
|
|
101 |
// Space to set variables.
|
|
|
102 |
$font-size-base: 0.9375rem
|
|
|
103 |
|
|
|
104 |
// Import FontAwesome.
|
|
|
105 |
@import "fontawesome";
|
|
|
106 |
|
|
|
107 |
// Import All of Bootstrap.
|
|
|
108 |
@import "bootstrap";
|
|
|
109 |
|
|
|
110 |
// Import Core moodle CSS.
|
|
|
111 |
@import "moodle";
|
|
|
112 |
|
|
|
113 |
// Space to use Bootstrap mixins and extends.
|
|
|
114 |
.navbar {
|
|
|
115 |
@include shadow();
|
|
|
116 |
}
|
|
|
117 |
|
|
|
118 |
Bootswatches
|
|
|
119 |
------------
|
|
|
120 |
Bootstrap 4 bootswatches can be imported using the theme/boost/cli/import-bootswatch.php script. Generated bootswatches can be added in the theme boost settings page.
|
|
|
121 |
|
|
|
122 |
Changed Components
|
|
|
123 |
------------------
|
|
|
124 |
Cards need this structure
|
|
|
125 |
class='card'
|
|
|
126 |
class='card-body'
|
|
|
127 |
This used to be 'card-block'
|
|
|
128 |
|
|
|
129 |
The header.mustache template has been replace by a navbar.mustache template for name consistancy with Bootstrap
|
|
|
130 |
|
|
|
131 |
A new header.mustache template has been created served from core/core_renderer.php. This should be move to core at some point.
|
|
|
132 |
|
|
|
133 |
|
|
|
134 |
=== 3.4 ===
|
|
|
135 |
* For improved accessibility, the footer links for boost have been changed to use $bg-inverse-link-color (defaults to white) and
|
|
|
136 |
now have an underline text-decoration. To override the link colour simply set $bg-inverse-link-color in your preset file or
|
|
|
137 |
theme scss.
|
|
|
138 |
* To match the new primary colour we are switching to using the UX pallette, which uses a purple colour for info. To override,
|
|
|
139 |
set $brand-info in your preset file or theme scss.
|