Skip to content

Commit c2c56d9

Browse files
committed
Merge branch 'v4-dev' of https://github.com/coreui/coreui into v4-dev-sync-pro
# Conflicts: # scss/_variables.scss # scss/sidebar/_sidebar.scss
2 parents f8033ee + e3f247f commit c2c56d9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+419
-1822
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# These are supported funding model platforms
22

3-
open_collective: bootstrap
3+
custom: "https://coreui.io/pro/"

build/postcss.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ module.exports = ctx => {
1313
autoprefixer: {
1414
cascade: false
1515
},
16+
'postcss-combine-duplicated-selectors': {},
1617
rtlcss: ctx.env === 'RTL' ? {} : false
1718
}
1819
}

docs/content/4.0/content/tables.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,10 @@ Highlight a table row or cell by adding a `.table-active` class.
212212

213213
For the accented tables ([striped rows](#striped-rows), [hoverable rows](#hoverable-rows), and [active tables](#active-tables)), we used some techniques to make these effects work for all our [table variants](#variants):
214214

215-
- We start by setting the background of a table cell with the `--coreui-table-bg` custom property. All table variants then set that custom property to colorize the table cells. This way, we don't get into trouble if semi-transparent colors are used as table backgrounds.
216-
- Then we add a gradient on the table cells with `background-image: linear-gradient(var(--coreui-table-accent-bg), var(--coreui-table-accent-bg));` to layer on top of any specified `background-color`. Since `--coreui-table-accent-bg` is transparent by default, we have an invisible transparent linear gradient by default.
217-
- When either `.table-striped`, `.table-hover` or `.table-active` classes are added, the `--coreui-table-accent-bg` is set to a semitransparent color to colorize the background.
218-
- For each table variant, we generate a `--coreui-table-accent-bg` color with the highest contrast depending on that color. For example, the accent color for `.table-primary` is darker while `.table-dark` has a lighter accent color.
215+
- We start by setting the background of a table cell with the `--cui-table-bg` custom property. All table variants then set that custom property to colorize the table cells. This way, we don't get into trouble if semi-transparent colors are used as table backgrounds.
216+
- Then we add a gradient on the table cells with `background-image: linear-gradient(var(--cui-table-accent-bg), var(--cui-table-accent-bg));` to layer on top of any specified `background-color`. Since `--cui-table-accent-bg` is transparent by default, we have an invisible transparent linear gradient by default.
217+
- When either `.table-striped`, `.table-hover` or `.table-active` classes are added, the `--cui-table-accent-bg` is set to a semitransparent color to colorize the background.
218+
- For each table variant, we generate a `--cui-table-accent-bg` color with the highest contrast depending on that color. For example, the accent color for `.table-primary` is darker while `.table-dark` has a lighter accent color.
219219
- Text and border colors are generated the same way, and their colors are inherited by default.
220220

221221
Behind the scenes it looks like this:

docs/content/4.0/customize/css-variables.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ CSS variables offer similar flexibility to Sass's variables, but without the nee
4747

4848
```css
4949
body {
50-
font: 1rem/1.5 var(--coreui-font-sans-serif);
50+
font: 1rem/1.5 var(--cui-font-sans-serif);
5151
}
5252
a {
53-
color: var(--coreui-blue);
53+
color: var(--cui-blue);
5454
}
5555
```

docs/content/4.0/migration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Badges were overhauled to better differentiate themselves from buttons and to be
9393
#### Breadcrumbs
9494

9595
- Simplified the default appearance of breadcrumbs by removing `padding`, `background-color`, and `border-radius`.
96-
- Added new CSS custom property `--coreui-breadcrumb-divider` for easy customization without needing to recompile CSS.
96+
- Added new CSS custom property `--cui-breadcrumb-divider` for easy customization without needing to recompile CSS.
9797

9898
#### Buttons
9999

docs/content/4.0/utilities/colors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Sometimes contextual classes cannot be applied due to the specificity of another
3535

3636
In addition to the following Sass functionality, consider reading about our included [CSS custom properties]({{< docsref "/customize/css-variables" >}}) (aka CSS variables) for colors and more.
3737

38-
Do you need a gradient in your custom CSS? Just add `background-image: var(--coreui-gradient);`.
38+
Do you need a gradient in your custom CSS? Just add `background-image: var(--cui-gradient);`.
3939
### Variables
4040

4141
Most `color` utilities are generated by our theme colors, reassigned from our generic color palette variables.

js/src/dropdown.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ class Dropdown extends BaseComponent {
296296
}
297297

298298
// We need to trim the value because custom properties can also include spaces
299-
const isEnd = getComputedStyle(this._menu).getPropertyValue('--coreui-position').trim() === 'end'
299+
const isEnd = getComputedStyle(this._menu).getPropertyValue('--cui-position').trim() === 'end'
300300

301301
if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {
302302
return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP

js/src/navigation.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ class Navigation extends BaseComponent {
9595

9696
_setActiveLink() {
9797
Array.from(this._element.querySelectorAll(SELECTOR_NAV_LINK)).forEach(element => {
98+
if (element.classList.contains(CLASS_NAME_NAV_GROUP_TOGGLE)) {
99+
return
100+
}
101+
98102
let currentUrl = String(window.location)
99103

100104
const urlHasParams = /\?.*=/

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@
1717
"scripts": {
1818
"start": "npm-run-all --parallel watch docs-serve",
1919
"bundlewatch": "bundlewatch --config .bundlewatch.config.json",
20-
"css": "npm-run-all css-compile css-prefix css-rtl css-minify",
20+
"css": "npm-run-all css-compile css-prefix css-minify",
2121
"css-compile": "sass --style expanded --source-map --embed-sources --no-error-css scss/:dist/css/",
22-
"css-rtl": "cross-env NODE_ENV=RTL postcss --config build/postcss.config.js --dir \"dist/css\" --ext \".rtl.css\" \"dist/css/*.css\" \"!dist/css/*.min.css\" \"!dist/css/*.rtl.css\"",
2322
"css-lint": "npm-run-all --continue-on-error --parallel css-lint-*",
2423
"css-lint-stylelint": "stylelint \"**/*.{css,scss}\" --cache --cache-location .cache/.stylelintcache --rd",
2524
"css-lint-vars": "fusv scss/ docs/assets/scss/",
@@ -67,7 +66,6 @@
6766
"netlify": "cross-env-shell HUGO_BASEURL=$DEPLOY_PRIME_URL npm-run-all dist release-sri docs-build",
6867
"watch": "npm-run-all --parallel watch-*",
6968
"watch-css-main": "nodemon --watch scss/ --ext scss --exec \"npm-run-all css-lint css-compile css-prefix\"",
70-
"watch-css-dist": "nodemon --watch dist/css/ --ext css --ignore \"dist/css/*.rtl.*\" --exec \"npm run css-rtl\"",
7169
"watch-css-docs": "nodemon --watch docs/assets/scss/ --ext scss --exec \"npm run css-lint\"",
7270
"watch-js-main": "nodemon --watch js/src/ --ext js --exec \"npm-run-all js-lint js-compile\"",
7371
"watch-js-docs": "nodemon --watch docs/assets/js/ --ext js --exec \"npm run js-lint\""
@@ -84,7 +82,6 @@
8482
"url": "https://github.com/coreui/coreui/issues"
8583
},
8684
"license": "MIT",
87-
"dependencies": {},
8885
"peerDependencies": {
8986
"@popperjs/core": "^2.9.0"
9087
},
@@ -126,6 +123,7 @@
126123
"npm-run-all": "^4.1.5",
127124
"postcss": "^8.2.6",
128125
"postcss-cli": "^8.3.1",
126+
"postcss-combine-duplicated-selectors": "^10.0.2",
129127
"rollup": "^2.40.0",
130128
"rollup-plugin-istanbul": "^3.0.0",
131129
"rtlcss": "^3.1.2",

scss/_accordion.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
flex-shrink: 0;
3737
width: $accordion-icon-width;
3838
height: $accordion-icon-width;
39-
margin-left: auto;
39+
@include ltr-rtl("margin-left", auto);
4040
content: "";
4141
background-image: var(--#{$variable-prefix}accordion-button-icon, escape-svg($accordion-button-icon));
4242
background-repeat: no-repeat;

0 commit comments

Comments
 (0)