Skip to content

Commit 89c1f29

Browse files
authored
Merge pull request #1093 from pat270/1091
fix(bs3-bs4-compat): Add lexicon-ux@1.x mixins
2 parents b9f0c89 + fe64ce9 commit 89c1f29

File tree

4 files changed

+792
-8
lines changed

4 files changed

+792
-8
lines changed

maintenance/projects/js-themes-toolkit-v10-x/packages/bs3-bs4-compat/README.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,17 @@ In order for sass to compile correctly, you must import them correctly so that i
3131
- [`_components.scss`](scss/_components_.scss): This file imports all component specific style overrides.
3232
- [`_variables.scss`](scss/_variables.scss): This file contains variables for toggling specific compat components off.
3333

34-
_Note: all three compat files are imported into main.scss in that specific order._
35-
3634
### Adding to a Theme
3735

38-
You need to import the `.scss` files into your theme. Below is an example of adding it to the styled and classic themes in DXP.
36+
You need to import the `.scss` files into your theme. If you are using any Bootstrap 3 or Lexicon 1.x mixins in `_clay_custom.scss`, make sure to import it. Below is an example of adding it to the styled and classic themes in DXP.
3937

4038
**Styled Theme**
4139

4240
`modules/apps/frontend-theme/frontend-theme-styled/src/css/clay.scss`
4341

4442
```diff
43+
+ @import '@liferay/bs3-bs4-compat/scss/mixins';
44+
4545
@import 'clay/base';
4646

4747
+ @import '@liferay/bs3-bs4-compat/scss/variables';
@@ -54,6 +54,8 @@ You need to import the `.scss` files into your theme. Below is an example of add
5454
`modules/apps/frontend-theme/frontend-theme-classic/src/css/clay.scss`
5555

5656
```diff
57+
+ @import '@liferay/bs3-bs4-compat/scss/mixins';
58+
5759
@import 'clay/atlas';
5860

5961
+ @import '@liferay/bs3-bs4-compat/scss/variables';
@@ -63,4 +65,28 @@ You need to import the `.scss` files into your theme. Below is an example of add
6365
+ @import '@liferay/bs3-bs4-compat/scss/components';
6466
```
6567

66-
After making this change and deploying to your DXP bundle, you should see the compatibility layer working.
68+
If your `_custom.scss` file relies on Liferay's media query mixins, Bootstrap 3, or Lexicon 1.x, the build may fail due to missing imports. You will need to change the imports like so:
69+
70+
[7.1.x Classic Theme \_imports.scss](https://github.com/liferay/liferay-portal/blob/7.1.x/modules/apps/frontend-theme/frontend-theme-classic/src/css/_imports.scss)
71+
72+
```diff
73+
- @import "clay_custom";
74+
75+
@import "bourbon";
76+
77+
- @import "mixins";
78+
+ @import 'liferay-frontend-css-common/mixins';
79+
80+
- @import "compat/mixins";
81+
+ @import '@liferay/bs3-bs4-compat/scss/mixins';
82+
83+
@import "clay/atlas-variables";
84+
85+
+ @import '@liferay/bs3-bs4-compat/scss/atlas_variables';
86+
87+
+ @import '@liferay/bs3-bs4-compat/scss/variables';
88+
89+
+ @import 'clay/_cadmin-variables';
90+
```
91+
92+
After making these changes and deploying to your DXP bundle, you should see the compatibility layer working.

0 commit comments

Comments
 (0)