-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.scss
147 lines (145 loc) · 3.2 KB
/
demo.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
@import "./lib/helper";
$code-block-background: #2a2734;
$padding: 24px;
.demo-block {
@include default-border-style(#eee);
border-radius: 2px 2px 0 0;
border-bottom: none;
padding: $padding;
-webkit-border-radius: 2px 2px 0 0;
-moz-border-radius: 2px 2px 0 0;
-ms-border-radius: 2px 2px 0 0;
-o-border-radius: 2px 2px 0 0;
}
pre {
font-family: "Fira Code Medium", Consolas, monospace;
font-size: $regular-text-size;
}
pre pre {
padding: calc(#{$padding} + 10px) 0 0 calc(#{$padding} + 10px);
}
.code-block-control {
height: 40px;
position: sticky;
position: -webkit-sticky;
bottom: 0px;
text-align: center;
background-color: #fff;
border: {
style: solid;
color: #eee;
width: 1px;
radius: 0 0 2px 2px;
}
cursor: pointer;
.expand-control {
// background-color: red;
height: 40px;
padding: 9px 0 9px 0;
display: flex;
justify-content: center;
align-items: center;
}
i,
svg {
line-height: 40px;
color: $secondary-text;
@include decent-transition;
display: inline;
}
span {
display: inline-block;
@include transparentize-item;
margin-left: 4px;
@include decent-transition;
// font-size: 16px;
}
button {
position: absolute;
line-height: 26px;
top: 0;
right: 0;
padding: 7px 25px 7px 5px;
background: none;
border: none;
display: none;
color: $main-color;
font-size: 14px;
cursor: pointer;
@include decent-transition;
}
@include decent-transition;
}
div.demo:hover,
div.code-block-control:hover {
.code-block-control svg {
color: $secondary-text;
transform: translateX(-30px);
}
.code-block-control span {
@include opacify-item;
transform: translateX(-30px);
color: $secondary-text;
}
.code-block-control button {
display: inline;
}
}
div.demo:hover {
@include decent-shadow;
}
div.code-block-control:hover {
background: #f9fafc;
.expand-control {
span,
svg {
color: $main-color;
}
}
}
.code-block {
display: flex;
flex-direction: column;
justify-content: center;
align-items: left;
// height: 0px;
overflow: hidden;
// background-color: #2a2734;
background-color: transparentize($color: #ccc, $amount: 0.8);
border: {
style: solid;
color: #eee;
width: 1px;
}
border-top: none;
border-bottom: none;
.code-area {
padding: 12px 24px;
}
}
.description {
background-color: white;
line-height: 1.4em;
padding: 16px;
margin: 10px;
border: {
style: solid;
color: #eee;
width: 1px;
radius: 4px;
}
.little-code {
background-color: transparentize($color: $main-color, $amount: 0.8);
border-radius: 2px;
padding: 1px 5px;
margin: 0 4px;
}
p > .little-code {
&:first-child {
margin-left: 0;
}
}
code {
font-family: Menlo, Monaco, Consolas, Courier, monospace;
}
}