1 |
efrain |
1 |
.close {
|
|
|
2 |
position: absolute;
|
|
|
3 |
top: 5px;
|
|
|
4 |
right: 5px;
|
|
|
5 |
|
|
|
6 |
padding: 0;
|
|
|
7 |
margin: 5px;
|
|
|
8 |
|
|
|
9 |
width: 29px;
|
|
|
10 |
height: 29px;
|
|
|
11 |
|
|
|
12 |
background-color: $gray-100;
|
|
|
13 |
color: $close-color;
|
|
|
14 |
border-radius: 30px;
|
|
|
15 |
|
|
|
16 |
line-height: 1;
|
|
|
17 |
|
|
|
18 |
transition: $transition-base;
|
|
|
19 |
|
|
|
20 |
.theme-dark & {
|
|
|
21 |
background-color: $dm-gray-100;
|
|
|
22 |
color: $dm-close-color;
|
|
|
23 |
}
|
|
|
24 |
|
|
|
25 |
&:hover {
|
|
|
26 |
background-color: $red-600;
|
|
|
27 |
|
|
|
28 |
&:before {
|
|
|
29 |
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='#{url-friendly-colour($red-100)}' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M17.25 6.75L6.75 17.25'/%3E%3Cpath stroke='#{url-friendly-colour($red-100)}' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M6.75 6.75L17.25 17.25'/%3E%3C/svg%3E%0A");
|
|
|
30 |
}
|
|
|
31 |
}
|
|
|
32 |
|
|
|
33 |
&:before {
|
|
|
34 |
content: '';
|
|
|
35 |
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='#{url-friendly-colour($close-color)}' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M17.25 6.75L6.75 17.25'/%3E%3Cpath stroke='#{url-friendly-colour($close-color)}' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M6.75 6.75L17.25 17.25'/%3E%3C/svg%3E%0A");
|
|
|
36 |
background-size: 20px;
|
|
|
37 |
background-position: center;
|
|
|
38 |
background-repeat: no-repeat;
|
|
|
39 |
|
|
|
40 |
width: 100%;
|
|
|
41 |
height: 100%;
|
|
|
42 |
position: absolute;
|
|
|
43 |
top: 0;
|
|
|
44 |
right: 0;
|
|
|
45 |
|
|
|
46 |
.theme-dark & {
|
|
|
47 |
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='#{url-friendly-colour($dm-close-color)}' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M17.25 6.75L6.75 17.25'/%3E%3Cpath stroke='#{url-friendly-colour($dm-close-color)}' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M6.75 6.75L17.25 17.25'/%3E%3C/svg%3E%0A");
|
|
|
48 |
}
|
|
|
49 |
}
|
|
|
50 |
|
|
|
51 |
// Override <a>'s hover style
|
|
|
52 |
@include hover() {
|
|
|
53 |
color: $close-color;
|
|
|
54 |
text-decoration: none;
|
|
|
55 |
|
|
|
56 |
.theme-dark & {color: $dm-close-color;}
|
|
|
57 |
}
|
|
|
58 |
|
|
|
59 |
&:not(:disabled):not(.disabled) {
|
|
|
60 |
@include hover-focus() {
|
|
|
61 |
opacity: 1;
|
|
|
62 |
}
|
|
|
63 |
}
|
|
|
64 |
}
|
|
|
65 |
|
|
|
66 |
// Additional properties for button version
|
|
|
67 |
// iOS requires the button element instead of an anchor tag.
|
|
|
68 |
// If you want the anchor version, it requires `href="#"`.
|
|
|
69 |
// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
|
|
|
70 |
|
|
|
71 |
// stylelint-disable-next-line selector-no-qualifying-type
|
|
|
72 |
button.close {
|
|
|
73 |
border: 0;
|
|
|
74 |
}
|
|
|
75 |
|
|
|
76 |
// Future-proof disabling of clicks on `<a>` elements
|
|
|
77 |
|
|
|
78 |
// stylelint-disable-next-line selector-no-qualifying-type
|
|
|
79 |
a.close.disabled {
|
|
|
80 |
pointer-events: none;
|
|
|
81 |
}
|