Merge branch 'MDL-81818-main' of https://github.com/roland04/moodle

This commit is contained in:
Huong Nguyen 2024-06-25 09:26:29 +07:00
commit 0d14b122eb
No known key found for this signature in database
GPG Key ID: 40D88AB693A3E72A
13 changed files with 38 additions and 15 deletions

View File

@ -0,0 +1,5 @@
issueNumber: MDL-81818
notes:
theme_boost:
- message: 'Bootstrap .no-gutters class is no longer used, use .g-0 instead.'
type: changed

View File

@ -392,11 +392,11 @@ Note that content should not be larger than the height of the image. If content
## Horizontal
Using a combination of grid and utility classes, cards can be made horizontal in a mobile-friendly and responsive way. In the example below, we remove the grid gutters with `.no-gutters` and use `.col-md-*` classes to make the card horizontal at the `md` breakpoint. Further adjustments may be needed depending on your card content.
Using a combination of grid and utility classes, cards can be made horizontal in a mobile-friendly and responsive way. In the example below, we remove the grid gutters with `.g-0` and use `.col-md-*` classes to make the card horizontal at the `md` breakpoint. Further adjustments may be needed depending on your card content.
{{< example >}}
<div class="card mb-3" style="max-width: 540px;">
<div class="row no-gutters">
<div class="row g-0">
<div class="col-md-4">
{{< placeholder width="100%" height="250" class="" text="Image" >}}
</div>

View File

@ -38,7 +38,7 @@ Media objects do not have `position: relative` by default, so we need to add the
Columns are `position: relative` by default, so clickable columns only require the `.stretched-link` class on a link. However, stretching a link over an entire `.row` requires `.position-static` on the column and `.position-relative` on the row.
{{< example >}}
<div class="row no-gutters bg-light position-relative">
<div class="row g-0 bg-light position-relative">
<div class="col-md-6 mb-md-0 p-md-4">
{{< placeholder width="100%" height="200" class="w-100" text=" " title="Generic placeholder image" >}}
</div>

View File

@ -1,7 +1,7 @@
{{ partial "skippy" . }}
<div class="container-fluid p-0 bg-white" data-region="componentlibrary">
<div class="row no-gutters flex-xl-nowrap">
<div class="row g-0 flex-xl-nowrap">
<div class="col-md-3 col-xl-2 sidebar">
<div class="controls d-flex justify-content-between">
<div class="simplesearchform w-100">

View File

@ -6,7 +6,7 @@
{{ range $.Site.Data.fontawesomeicons }}
<div class="card mb-2 mx-1 p-1 d-flex flex-column justify-content-around text-center" style="flex: 0 0 20%; height: 150px">
<div class="small text-truncate" data-toggle="tooltip" data-placement="bottom" title="{{ .name }}">{{ .name }}</div>
<div class="row no-gutters">
<div class="row g-0">
<div class="col-sm-6 d-flex align-items-center justify-content-center">
<i class="fa {{ .icon }} fa-2x"></i>
</div>

View File

@ -27,7 +27,7 @@
<hr class="mt-0"/>
<div role="search" data-region="filter" class="d-flex align-items-center my-2" aria-label="{{#str}} aria:controls, block_myoverview {{/str}}">
<div class="row no-gutters">
<div class="row g-0">
{{> block_myoverview/nav-grouping-selector }}
{{> block_myoverview/nav-search-widget }}

View File

@ -25,7 +25,7 @@
<div id="block-timeline-{{uniqid}}-{{timelineinstanceid}}" class="block-timeline" data-region="timeline">
<div class="p-0 px-2">
<div class="row no-gutters">
<div class="row g-0">
<div class="mr-2 mb-1">
{{> block_timeline/nav-day-filter }}
</div>

View File

@ -42,7 +42,7 @@
role="region"
>
<div class="container-fluid">
<div class="row h-100 no-gutters">
<div class="row h-100 g-0">
<div class="col-4 d-flex flex-column conversationcontainer">
<div class="border-right h-100">
<div class="panel-header-container" data-region="panel-header-container">

View File

@ -46,7 +46,7 @@
{{#hasattempts}}
<h3>{{# str}}summaryofattempts, quiz{{/str}}</h3>
<ul class="list-unstyled row row-cols-1 row-cols-md-2 no-gutters">
<ul class="list-unstyled row row-cols-1 row-cols-md-2 g-0">
{{#attempts}}
<li class="col pl-0 pr-2 mb-2">

View File

@ -4,6 +4,9 @@ $breadcrumb-divider-rtl: "◀" !default;
// Specific overrides to make Bootstrap RTL.
@import "moodle/bootstrap-rtl";
// Specific SCSS to make some Bootstrap 5 syntax work with Moodle.
@import "moodle/bs5-bridge";
// Old Moodle stuff from base theme.
// Massive, needs broken up.
@import "moodle/variables";

View File

@ -0,0 +1,7 @@
/* Bootstrap 5 bridge classes */
/* These classes are used to bridge the gap between Bootstrap 4 and Bootstrap 5. */
/* This file should be removed as part of MDL-75669. */
.g-0 {
@extend .no-gutters;
}

View File

@ -13898,12 +13898,13 @@ pre code {
margin-left: -15px;
}
.no-gutters {
.no-gutters, .g-0 {
margin-right: 0;
margin-left: 0;
}
.no-gutters > .col,
.no-gutters > [class*=col-] {
.no-gutters > .col, .g-0 > .col,
.no-gutters > [class*=col-],
.g-0 > [class*=col-] {
padding-right: 0;
padding-left: 0;
}
@ -22964,6 +22965,9 @@ a.text-dark:hover, a.text-dark:focus {
right: calc(-0.5rem - 1px);
}
/* Bootstrap 5 bridge classes */
/* These classes are used to bridge the gap between Bootstrap 4 and Bootstrap 5. */
/* This file should be removed as part of MDL-75669. */
/**
* Moodle variables
*

View File

@ -13898,12 +13898,13 @@ pre code {
margin-left: -15px;
}
.no-gutters {
.no-gutters, .g-0 {
margin-right: 0;
margin-left: 0;
}
.no-gutters > .col,
.no-gutters > [class*=col-] {
.no-gutters > .col, .g-0 > .col,
.no-gutters > [class*=col-],
.g-0 > [class*=col-] {
padding-right: 0;
padding-left: 0;
}
@ -22964,6 +22965,9 @@ a.text-dark:hover, a.text-dark:focus {
right: calc(-0.5rem - 1px);
}
/* Bootstrap 5 bridge classes */
/* These classes are used to bridge the gap between Bootstrap 4 and Bootstrap 5. */
/* This file should be removed as part of MDL-75669. */
/**
* Moodle variables
*