forked from jesseweed/seti-ui
/
ui-mixins.less
118 lines (99 loc) · 2.49 KB
/
ui-mixins.less
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
// SET COLOR & HOVER EFFECT FOR A LINK
.link-color(@color: @seti-primary) {
color: @color;
transition: 0.25s color;
&:hover {
color: lighten(@color, 15%);
cursor: pointer;
text-decoration: none;
}
}
.svg-icon(@filename, @attr: ~'', @insert: before) {
@pseudo-selector: ~'::@{insert}';
.icon-file-text, .icon-file-zip, .icon-file-media, .icon-book, .icon-file-pdf {
&@{attr}@{pseudo-selector} {
content: ' ';
background-image: url("http://localhost:5000/icons/@{filename}.svg");
background-repeat: no-repeat;
background-position: center;
background-size: contain;
height: 16px;
width: 16px;
}
}
}
// SET ICON FILE BASED ON DATA NAME
.icon-default(@file) {
.svg-icon(@file);
}
.icon-default(@file, @color) {
.svg-icon("@{file}_@{color}");
}
.icon-ext(@extension, @file) {
.svg-icon(@file, ~'[data-name$="@{extension}"]');
}
.icon-ext(@extension, @file, @color) {
.svg-icon("@{file}_@{color}", ~'[data-name$="@{extension}"]');
}
.icon-name(@name, @file) {
.svg-icon(@file, ~'[data-name*="@{name}"]');
}
.icon-name(@name, @file, @color) {
.svg-icon("@{file}_@{color}", ~'[data-name*="@{name}"]');
}
// SET ICON FOR TAB BASED ON DATA TYPE
.tab-icon(@data-type, @file-type, @color) {
&[data-type="@{data-type}"] .icon {
.icon(@file-type, @color);
&::before {
margin-right: 7px;
}
}
}
// MINI EDITOR - LARGE
.input(@bg: #000; @color: @white; @padding: 10px;) {
atom-text-editor[mini] {
background: @bg;
color: @color;
font-family: @seti-font-family;
font-size: 14px;
font-weight: 300;
height: 45px;
letter-spacing: 0.05em;
max-height: 60px;
padding: @padding;
margin: 0;
.syntax--text.syntax--plain {
color: @color;
}
.highlights .highlight.selection .region {
background: @seti-primary;
color: @white;
}
.lines .cursors .cursor {
border-color: @color !important;
}
}
}
// MINI EDITOR - SMALL
.input-small(@bg: #000; @color: @white; @padding: 1px 7px;) {
atom-text-editor[mini] {
background: @bg;
color: @color;
font-family: @seti-font-family;
font-size: 12px;
font-weight: 500;
letter-spacing: 0.05em;
padding: @padding;
.syntax--text.syntax--plain {
color: @color;
}
.highlights .highlight.selection .region {
background: @seti-primary;
color: @seti-primary-text !important;
}
.lines .cursors .cursor {
border-color: @color !important;
}
}
}