Skip to content

Commit 2b83eb8

Browse files
author
MPopov
committed
fix(watermark): Docs and border radius for the link in all themes
1 parent a39c745 commit 2b83eb8

File tree

4 files changed

+45
-16
lines changed

4 files changed

+45
-16
lines changed

projects/igniteui-angular/src/lib/core/styles/components/watermark/_watermark-theme.scss

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
/// Returns a map containing all style properties related to the theming the watermark directive.
88
/// @param {Map} $palette [$default-palette] - The palette used as basis for styling the component.
99
/// @param {Map} $schema [$light-schema] - The schema used as basis for styling the component.
10+
/// @param {Number} $border-radius [null] - The border radius used for the link.
11+
/// @param {Color} $border-color [null] - The border color used for the link.
12+
/// @param {Color} $link-background [null] - The background color used for the link.
13+
/// @param {Color} $color [null] - The color used for the link text.
1014
///
1115
/// @requires $default-palette
1216
/// @requires $light-schema
@@ -15,10 +19,10 @@
1519
/// @requires text-contrast
1620
/// @requires round-borders
1721
///
18-
/// @example scss Change the watermark background
19-
/// $my-watermark-theme: igx-watermark-theme($background: magenta);
22+
/// @example scss Change the watermark link background
23+
/// $my-watermark-theme: igx-watermark-theme($link-background: magenta);
2024
/// // Pass the theme to the igx-watermark component mixin
21-
/// @include igx-watermark($my-checkbox-theme);
25+
/// @include igx-watermark($my-watermark-theme);
2226
@function igx-watermark-theme(
2327
$palette: $default-palette,
2428
$schema: $light-schema,
@@ -85,6 +89,7 @@
8589
font-size: rem(14px);
8690
padding: rem(2px) rem(4px);
8791
line-height: normal;
92+
border-radius: --var($theme, 'border-radius');
8893
border: 1px solid --var($theme, 'border-color');
8994
color: --var($theme, 'color');
9095
z-index: 10002;
@@ -111,3 +116,4 @@
111116
}
112117
}
113118
}
119+

projects/igniteui-angular/src/lib/core/styles/themes/schemas/dark/_watermark.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ $_dark-watermark-image: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3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zAxIDYxLjQxNyA0Mi42OUM2MS4xNjc4IDQyLjE3NTkgNjEuMTIxNCA0MS41ODY4IDYxLjI4NyA0MS4wNEw2NC4xMjcgMzAuNDY5QzY0Ljg0MjMgMjcuODExIDY0LjczNiAyNS43MDM3IDYzLjgwOCAyNC4xNDdMNjMuODEyIDI0LjE1MlpNNTcuNyAzNC4zNjdMNTYuMDQzIDQwLjUzM0w1NS4xMzEgNDAuNTg4QzUzLjQwMjMgNDAuNjM1MyA1MS42NzU0IDQwLjQ0MTggNTAgNDAuMDEzQzQ4LjEwOTMgMzkuNTA3NyA0Ny40NTA3IDM4LjE4ODcgNDguMDI0IDM2LjA1NkM0OC4wOTI2IDM1LjU5NiA0OC4yNTk1IDM1LjE1NjIgNDguNTEzNCAzNC43NjY1QzQ4Ljc2NzMgMzQuMzc2OCA0OS4xMDIxIDM0LjA0NjQgNDkuNDk1MiAzMy43OTc3QzQ5Ljg4ODIgMzMuNTQ5MSA1MC4zMzAzIDMzLjM4ODEgNTAuNzkxMiAzMy4zMjU3QzUxLjI1MiAzMy4yNjMyIDUxLjcyMSAzMy4zMDA5IDUyLjE2NiAzMy40MzZMNTcuNyAzNC4zNjdaTTcxLjUzMiA0OS42NDJMODAuMzUyIDE2LjgxNkw3NS4yODQgMTUuNDYyTDY2LjQ2NCA0OC4yODhMNzEuNTMyIDQ5LjY0MloiIGZpbGw9IiMwMDk5RkYiLz4KPC9nPgo8L3N2Zz4K')
20+
background-image: url($_dark-watermark-image)
2121
)
2222
);
2323

projects/igniteui-angular/src/lib/core/styles/themes/schemas/light/_watermark.scss

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,67 +11,75 @@ $_light-watermark-image: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3
1111

1212
/// Generates a light watermark schema.
1313
/// @type {Map}
14+
/// @prop {Number} $border-radius [0] - The border radius fraction, between 0-1 to be used for the link.
15+
/// @prop {Map} $border-color [igx-color: ('primary')] - The border color used for the link.
16+
/// @prop {Map} $link-background [igx-color: ('primary')] - The background color used for the link.
17+
/// @prop {Color} $color [#fff] - The color used for the link text.
1418
/// @requires {function} extend
19+
/// @requires {Map} $_material-shape-watermark
1520
$_light-watermark: extend(
16-
$_square-shape-watermark,
21+
$_material-shape-watermark,
1722
(
1823
variant: 'material',
1924

2025
link-background: (
2126
igx-color: ('primary'),
2227
),
2328

24-
background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTg0IiBoZWlnaHQ9IjEwNCIgdmlld0JveD0iMCAwIDE4NCAxMDQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIG9wYWNpdHk9IjAuMDUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTYuNyAxMC4xTDEwLjMgOC4zOTk5OUwxMi4xIDEuNjk5OTlMNy4xIDAuMzk5OTk0TDUuMyA3LjA5OTk5TDIuMyA2LjI5OTk5TDEuMSAxMC42TDQuMSAxMS40TDEuMiAyMi4yQzAuMjk5OTk3IDI1LjUgMC4xOTk5OTcgMjcuOSAwLjc5OTk5NyAyOS40QzEuNSAzMC45IDMuMSAzMiA1LjcgMzIuN0M3LjMgMzMuMSA5IDMzLjMgMTAuNiAzMy40TDExLjUgMjkuM0w3LjcgMjguNEM2LjYgMjguMSA1LjkgMjcuNiA1LjggMjYuOUM1LjggMjUuNiA2IDI0LjMgNi40IDIzTDkuMSAxMi44TDE1LjUgMTQuNUwxNi43IDEwLjFaTTE5LjcgMzUuOEwyNCAxOS42TDI1LjEgMTkuNUMyNy41IDE5LjIgMzAgMTkuMSAzMi41IDE5LjNMMzMuOSAxNC4yQzMwLjkgMTQgMjcuOSAxNC40IDI1LjEgMTUuNEwyNS44IDEyLjZMMjAuOCAxMS4zTDE0LjYgMzQuNUwxOS43IDM1LjhaTTM2LjUgNDAuM0w0Mi43IDE3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
border-color: (
2834
igx-color: ('primary'),
2935
),
30-
31-
roundness: rem(0)
3236
)
3337
);
3438

3539
/// Generates a light fluent watermark schema.
3640
/// @type {Map}
3741
/// @requires {function} extend
38-
/// @requires $_light-watermark
42+
/// @requires {Map} $_light-watermark
43+
/// @requires {Map} $_fluent-shape-watermark
3944
$_fluent-watermark: extend(
4045
$_light-watermark,
4146
$_fluent-shape-watermark,
4247
(
4348
variant: 'fluent',
49+
4450
background-image: #{url($_light-watermark-image)},
45-
roundness: rem(2px)
4651
)
4752
);
4853

4954
/// Generates a bootstrap watermark schema.
5055
/// @type {Map}
5156
/// @requires {function} extend
52-
/// @requires $_light-watermark
57+
/// @requires {Map} $_light-watermark
58+
/// @requires {Map} $_bootstrap-shape-watermark
5359
$_bootstrap-watermark: extend(
5460
$_light-watermark,
5561
$_bootstrap-shape-watermark,
5662
(
5763
variant: 'bootstrap',
64+
5865
background-image: #{url($_light-watermark-image)},
59-
roundness: rem(4px)
6066
)
6167
);
6268

6369
/// Generates an indigo watermark schema.
6470
/// @type {Map}
71+
/// @prop {Map} $border-color [igx-color: ('primary', 300)] - The border color for the link.
6572
/// @requires {function} extend
66-
/// @requires $_light-watermark
73+
/// @requires {Map} $_light-watermark
74+
/// @requires {Map} $_indigo-shape-watermark
6775
$_indigo-watermark: extend(
6876
$_light-watermark,
77+
$_indigo-shape-watermark,
6978
(
7079
variant: 'indigo-design',
80+
7181
background-image: #{url($_light-watermark-image)},
72-
link-background: (
73-
igx-color: 'primary',
74-
),
82+
7583
border-color: (
7684
igx-color: ('primary', 300),
7785
),

projects/igniteui-angular/src/lib/core/styles/themes/schemas/shape/_watermark.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,34 @@
33
/// @access private
44
/// @author <a href="https://github.com/desig9stein" target="_blank">Marin Popov</a>
55
////
6+
7+
/// @type Map
68
$_round-shape-watermark: (
79
border-radius: 1,
810
);
911

12+
/// @type Map
1013
$_square-shape-watermark: (
1114
border-radius: 0,
1215
);
1316

17+
/// @type Map
18+
$_material-shape-watermark: (
19+
border-radius: 0,
20+
);
21+
22+
/// @type Map
1423
$_fluent-shape-watermark: (
1524
border-radius: 2px,
1625
);
1726

27+
/// @type Map
1828
$_bootstrap-shape-watermark: (
1929
border-radius: 4px,
2030
);
2131

32+
/// @type Map
33+
$_indigo-shape-watermark: (
34+
border-radius: 1,
35+
);
36+

0 commit comments

Comments
 (0)