Skip to content

Commit 7c8a91e

Browse files
committed
use react-s-alert default css
1 parent 21afa1b commit 7c8a91e

File tree

3 files changed

+164
-202
lines changed

3 files changed

+164
-202
lines changed

css/s-alert-default.css

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
/* Common, default styles for the notification box */
2+
3+
.s-alert-box,
4+
.s-alert-box * {
5+
box-sizing: border-box;
6+
}
7+
8+
.s-alert-box {
9+
position: fixed;
10+
background: rgba(42,45,50,0.85);
11+
padding: 22px;
12+
line-height: 1.4;
13+
z-index: 1000;
14+
pointer-events: none;
15+
color: rgba(250,251,255,0.95);
16+
font-size: 100%;
17+
font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, sans-serif;
18+
max-width: 300px;
19+
-webkit-transition: top .4s, bottom .4s;
20+
transition: top .4s, bottom .4s;
21+
}
22+
23+
.s-alert-box.s-alert-show {
24+
pointer-events: auto;
25+
}
26+
27+
.s-alert-box a {
28+
color: inherit;
29+
opacity: 0.7;
30+
font-weight: 700;
31+
}
32+
33+
.s-alert-box a:hover,
34+
.s-alert-box a:focus {
35+
opacity: 1;
36+
}
37+
38+
.s-alert-box p {
39+
margin: 0;
40+
}
41+
42+
.s-alert-box.s-alert-show,
43+
.s-alert-box.s-alert-visible {
44+
pointer-events: auto;
45+
}
46+
47+
.s-alert-close {
48+
width: 20px;
49+
height: 20px;
50+
position: absolute;
51+
right: 4px;
52+
top: 4px;
53+
overflow: hidden;
54+
text-indent: 100%;
55+
cursor: pointer;
56+
-webkit-backface-visibility: hidden;
57+
backface-visibility: hidden;
58+
}
59+
60+
.s-alert-close:hover,
61+
.s-alert-close:focus {
62+
outline: none;
63+
}
64+
65+
.s-alert-close::before,
66+
.s-alert-close::after {
67+
content: '';
68+
position: absolute;
69+
width: 3px;
70+
height: 60%;
71+
top: 50%;
72+
left: 50%;
73+
background: #fff;
74+
}
75+
76+
.s-alert-close:hover::before,
77+
.s-alert-close:hover::after {
78+
background: #fff;
79+
}
80+
81+
.s-alert-close::before {
82+
-webkit-transform: translate(-50%,-50%) rotate(45deg);
83+
transform: translate(-50%,-50%) rotate(45deg);
84+
}
85+
86+
.s-alert-close::after {
87+
-webkit-transform: translate(-50%,-50%) rotate(-45deg);
88+
transform: translate(-50%,-50%) rotate(-45deg);
89+
}
90+
91+
/* positions */
92+
93+
.s-alert-bottom-left {
94+
top: auto;
95+
right: auto;
96+
bottom: 30px;
97+
left: 30px;
98+
}
99+
.s-alert-top-left {
100+
top: 30px;
101+
right: auto;
102+
bottom: auto;
103+
left: 30px;
104+
}
105+
.s-alert-top-right {
106+
top: 30px;
107+
right: 30px;
108+
bottom: auto;
109+
left: auto;
110+
}
111+
.s-alert-bottom-right { /*default*/
112+
top: auto;
113+
right: 30px;
114+
bottom: 30px;
115+
left: auto;
116+
}
117+
.s-alert-bottom {
118+
width: 100%;
119+
max-width: 100%;
120+
bottom: 0;
121+
left: 0;
122+
right: 0;
123+
top: auto;
124+
}
125+
.s-alert-top {
126+
width: 100%;
127+
max-width: 100%;
128+
top: 0;
129+
left: 0;
130+
right: 0;
131+
bottom: auto;
132+
}
133+
134+
/* conditions */
135+
136+
.s-alert-info {
137+
background: #00A2D3;
138+
color: #fff;
139+
}
140+
.s-alert-success {
141+
background: #27AE60;
142+
color: #fff;
143+
}
144+
.s-alert-warning {
145+
background: #F1C40F;
146+
color: #fff;
147+
}
148+
.s-alert-error {
149+
background: #E74C3C;
150+
color: #fff;
151+
}
152+
153+
[class^="s-alert-effect-"].s-alert-hide,
154+
[class*=" s-alert-effect-"].s-alert-hide {
155+
-webkit-animation-direction: reverse;
156+
animation-direction: reverse;
157+
}
158+
159+
/* height measurement helper */
160+
.s-alert-box-height {
161+
visibility: hidden;
162+
position: fixed;
163+
}

css/toastr.css

Lines changed: 0 additions & 201 deletions
This file was deleted.

gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ gulp.task('prod', ['umdBuild'], function() {
4646
.pipe(concatCss("./react-bootstrap-table.min.css"))
4747
.pipe(cssmin())
4848
.pipe(gulp.dest('./dist'));
49-
gulp.src(['./css/react-bootstrap-table.css', './css/toastr.css'])
49+
gulp.src(['./css/react-bootstrap-table.css', './css/s-alert-default.css'])
5050
.pipe(concatCss('./react-bootstrap-table-all.min.css'))
5151
.pipe(cssmin())
5252
.pipe(gulp.dest('./dist'));

0 commit comments

Comments
 (0)