Skip to content

Commit ab4a016

Browse files
committed
[REF] theme_*: dispatch theme_common mixins into specific themes
theme_*: theme_bewise, theme_enark, theme_graphene, theme_treehouse This commit copies the `theme_common` mixins in the few places where they are used, to prepare for the future deletion of `theme_common`. task-3696867
1 parent 80aa5ad commit ab4a016

File tree

4 files changed

+117
-0
lines changed

4 files changed

+117
-0
lines changed

theme_bewise/static/src/old_snippets/s_big_icons/000.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// From old theme common.
2+
@mixin o-theme-chd-big-icons-styles($bg-color: o-color('alpha'), $border-color: o-color('alpha'),
3+
$transform: scale(1.1, 1.1), $fa-color: white, $h5-color: white) {
4+
5+
background-color: $bg-color !important;
6+
border-color: $border-color;
7+
transform: $transform;
8+
.fa {
9+
color: $fa-color !important;
10+
}
11+
h5.o_default_snippet_text {
12+
color: $h5-color !important;
13+
}
14+
}
115

216
/* Big Icon Circle */
317
@include o-theme-chd-big-icons-classes(4px solid o-color('alpha'), o-color('alpha'));

theme_enark/static/src/old_snippets/s_big_icons/000.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// From old theme common.
2+
@mixin o-theme-chd-big-icons-styles($bg-color: o-color('alpha'), $border-color: o-color('alpha'),
3+
$transform: scale(1.1, 1.1), $fa-color: white, $h5-color: white) {
4+
5+
background-color: $bg-color !important;
6+
border-color: $border-color;
7+
transform: $transform;
8+
.fa {
9+
color: $fa-color !important;
10+
}
11+
h5.o_default_snippet_text {
12+
color: $h5-color !important;
13+
}
14+
}
115

216
/* Big Icon Circle */
317
@include o-theme-chd-big-icons-classes(0, none);

theme_graphene/static/src/scss/secondary_variables.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
// From old theme common.
2+
@function o-theme-common-add-color-variations($from, $to, $variations: ('light': 10%, 'dark': -10%)) {
3+
$color-variations: ();
4+
@each $color-name in ('alpha', 'beta', 'gamma', 'delta', 'epsilon') {
5+
$color: map-get($from, $color-name);
6+
@if $color != null {
7+
@each $variation-name, $amount in $variations {
8+
$color-variations: map-merge($color-variations, (
9+
'#{$color-name}-#{$variation-name}': adjust-color($color, $lightness: $amount),
10+
));
11+
}
12+
}
13+
}
14+
@return map-merge($color-variations, $to);
15+
}
16+
117
// TODO Maybe we should handle light/dark variation in standard in such a way no
218
// extra classes are created (border-alpha-light, btn-epsilon-dark, ...)
319
$-palettes: $o-theme-color-palettes;

theme_treehouse/static/src/scss/compatibility-saas-11.4.scss

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,76 @@
1+
// From old theme common.
2+
@mixin fa-size-generator($base-size) {
3+
.fa {
4+
text-align: center;
5+
display: inline-block;
6+
vertical-align: middle;
7+
}
8+
.fa,
9+
.fa.fa-1x {
10+
width: ($base-size + 20px);
11+
height: ($base-size + 20px);
12+
line-height: ($base-size + 20px);
13+
}
14+
.fa.fa-2x {
15+
width: ($base-size + 40px);
16+
height: ($base-size + 40px);
17+
line-height: ($base-size + 40px);
18+
}
19+
.fa.fa-3x {
20+
width: ($base-size + 60px);
21+
height: ($base-size + 60px);
22+
line-height: ($base-size + 60px);
23+
}
24+
.fa.fa-4x {
25+
width: ($base-size + 80px);
26+
height: ($base-size + 80px);
27+
line-height: ($base-size + 80px);
28+
}
29+
.fa.fa-5x {
30+
width: ($base-size + 100px);
31+
height: ($base-size + 100px);
32+
line-height: ($base-size + 100px);
33+
}
34+
}
35+
36+
@mixin carousel-control($position, $fa-position, $fa-padding) {
37+
opacity: 1;
38+
text-shadow: none;
39+
color: map-get($grays, '900');
40+
font-size: inherit;
41+
width: 5%;
42+
.fa {
43+
top: 50%;
44+
background-color: #fff;
45+
&:hover {
46+
color: map-get($theme-colors, 'primary');
47+
}
48+
@include media-breakpoint-down(md) {
49+
top: auto;
50+
bottom: 0;
51+
}
52+
}
53+
@include fa-size-generator(20px);
54+
&.left {
55+
background-image: none;
56+
left: $position;
57+
.fa {
58+
left: $fa-position;
59+
right: auto;
60+
padding-right: $fa-padding;
61+
}
62+
}
63+
&.right {
64+
background-image: none;
65+
right: $position;
66+
.fa {
67+
right: $fa-position;
68+
left: auto;
69+
padding-left: $fa-padding;
70+
}
71+
}
72+
}
73+
174
#wrapwrap {
275

376
// Carousel

0 commit comments

Comments
 (0)