@phun-ky/speccer 3.5.2 → 4.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,274 @@
1
+ .ph.speccer.dissection
2
+ font-family sans-serif
3
+ height var(--ph-speccer-pin-size)
4
+ width var(--ph-speccer-pin-size)
5
+ display flex
6
+ position absolute
7
+ border-radius 100%
8
+ background-color var(--ph-speccer-pin-color)
9
+ color var(--ph-speccer-color-text-light)
10
+ font-weight 400
11
+ align-items center
12
+ justify-content center
13
+ line-height 150%
14
+ font-size 16px
15
+ z-index 100000
16
+ box-sizing content-box
17
+
18
+ .ph.speccer.dissection:after
19
+ content ""
20
+ position absolute
21
+ height var(--ph-speccer-pin-space)
22
+ top 100%
23
+ width var(--ph-speccer-line-width)
24
+ background-color var(--ph-speccer-pin-color)
25
+ z-index 99999
26
+
27
+
28
+ .ph.speccer.dissection.outline:after,
29
+ .ph.speccer.dissection.outline.top:after
30
+ height var(--ph-speccer-pin-space)
31
+ width var(--ph-speccer-line-width)
32
+ top 100%
33
+ right 50%
34
+
35
+ .ph.speccer.dissection.outline.left:after
36
+ height var(--ph-speccer-line-width)
37
+ width var(--ph-speccer-pin-space)
38
+ top 50%
39
+ left 100%
40
+
41
+ .ph.speccer.dissection.outline.right:after
42
+ height var(--ph-speccer-line-width)
43
+ width var(--ph-speccer-pin-space)
44
+ top 50%
45
+ right 100%
46
+
47
+ .ph.speccer.dissection.outline.bottom:after
48
+ height var(--ph-speccer-pin-space)
49
+ width var(--ph-speccer-line-width)
50
+ top calc(-100% - (var(--ph-speccer-pin-space) / 2))
51
+ right 50%
52
+
53
+
54
+ .ph.speccer.dissection
55
+ &:after
56
+ content ""
57
+ position absolute
58
+ height var(--ph-speccer-pin-space)
59
+ top 100%
60
+ width var(--ph-speccer-line-width)
61
+ background-color var(--ph-speccer-pin-color)
62
+ z-index 99999
63
+ &.outline
64
+ &.left
65
+ &:after
66
+ height var(--ph-speccer-line-width)
67
+ width var(--ph-speccer-pin-space)
68
+ top 50%
69
+ left 100%
70
+ &.right
71
+ &:after
72
+ height var(--ph-speccer-line-width)
73
+ width var(--ph-speccer-pin-space)
74
+ top 50%
75
+ right 100%
76
+ &.enclose
77
+ border-radius 0
78
+ background-color transparent
79
+ color var(--ph-speccer-measure-color)
80
+ border var(--ph-speccer-line-width) solid var(--ph-speccer-pin-color)
81
+ &.right
82
+ &:after
83
+ left calc(100% + calc(var(--ph-speccer-pin-space) + var(--ph-speccer-line-width)))
84
+ right auto
85
+ &:before
86
+ left 100%
87
+ right auto
88
+ &.left
89
+ &:after
90
+ left calc(var(--ph-speccer-line-width-negative) - var(--ph-speccer-pin-size) - var(--ph-speccer-pin-space))
91
+ right auto
92
+ &:before
93
+ right 100%
94
+ left auto
95
+ &.top
96
+ &:after
97
+ top calc(var(--ph-speccer-line-width-negative) - var(--ph-speccer-pin-size) - var(--ph-speccer-pin-space))
98
+ bottom auto
99
+ &:before
100
+ bottom 100%
101
+ top auto
102
+ &.bottom
103
+ &:after
104
+ top calc(100% + calc(var(--ph-speccer-pin-space) + var(--ph-speccer-line-width)))
105
+ bottom auto
106
+ &:before
107
+ top 100%
108
+ bottom auto
109
+ &.full
110
+ border-radius 0
111
+ background-color transparent
112
+ color var(--ph-speccer-measure-color)
113
+ border var(--ph-speccer-line-width) solid var(--ph-speccer-pin-color)
114
+ &.right
115
+ border-left none
116
+ &:after
117
+ left calc(8px + var(--ph-speccer-pin-space))
118
+ &:before
119
+ left 100%
120
+ &.left
121
+ border-right none
122
+ &:after
123
+ left calc(-8px - var(--ph-speccer-pin-space))
124
+ &:before
125
+ right 100%
126
+ &.top
127
+ border-bottom none
128
+ &:after
129
+ top calc(-8px - var(--ph-speccer-pin-space))
130
+ &:before
131
+ bottom 100%
132
+ &.bottom
133
+ border-top none
134
+ &:after
135
+ top calc(8px + var(--ph-speccer-pin-space))
136
+ &:before
137
+ top 100%
138
+ &.bottom
139
+ &:after
140
+ height var(--ph-speccer-pin-space)
141
+ width var(--ph-speccer-line-width)
142
+ top calc(-100% - (var(--ph-speccer-pin-space) / 2))
143
+ right 50%
144
+
145
+
146
+ .ph.speccer.dissection.outline.top:after,
147
+ .ph.speccer.dissection.outline:after
148
+ height var(--ph-speccer-pin-space)
149
+ width var(--ph-speccer-line-width)
150
+ top 100%
151
+ right 50%
152
+
153
+ [data-anatomy-section]
154
+ counter-reset type
155
+
156
+ .ph.speccer.dissection.outline.full.right,
157
+ .ph.speccer.dissection.outline.full.left
158
+ width 8px
159
+
160
+ .ph.speccer.dissection.outline.full.top,
161
+ .ph.speccer.dissection.outline.full.bottom
162
+ height 8px
163
+
164
+ .ph.speccer.dissection.outline.full.right:after,
165
+ .ph.speccer.dissection.outline.full.left:after,
166
+ .ph.speccer.dissection.outline.full.top:after,
167
+ .ph.speccer.dissection.outline.full.bottom:after
168
+ content attr(data-dissection-counter)
169
+ height var(--ph-speccer-pin-size)
170
+ width var(--ph-speccer-pin-size)
171
+ display flex
172
+ position absolute
173
+ border-radius 100%
174
+ background-color var(--ph-speccer-pin-color)
175
+ color var(--ph-speccer-color-text-light)
176
+ align-items center
177
+ justify-content center
178
+ line-height 150%
179
+ font-size 16px
180
+ z-index 100000
181
+
182
+ .ph.speccer.dissection.outline.full.right:after,
183
+ .ph.speccer.dissection.outline.full.left:after
184
+ top 50%
185
+ transform translateY(-50%)
186
+
187
+ .ph.speccer.dissection.outline.full.top:after,
188
+ .ph.speccer.dissection.outline.full.bottom:after
189
+ left 50%
190
+ transform translateX(-50%)
191
+
192
+ .ph.speccer.dissection.outline.full.right:before,
193
+ .ph.speccer.dissection.outline.full.left:before,
194
+ .ph.speccer.dissection.outline.full.top:before,
195
+ .ph.speccer.dissection.outline.full.bottom:before
196
+ content ""
197
+ position absolute
198
+ background-color var(--ph-speccer-pin-color)
199
+ z-index 100000
200
+ display block
201
+
202
+ .ph.speccer.dissection.outline.full.right:before,
203
+ .ph.speccer.dissection.outline.full.left:before
204
+ top 50%
205
+ transform translateY(-50%)
206
+ height var(--ph-speccer-line-width)
207
+ width calc(var(--ph-speccer-pin-space) + var(--ph-speccer-line-width))
208
+
209
+ .ph.speccer.dissection.outline.full.top:before,
210
+ .ph.speccer.dissection.outline.full.bottom:before
211
+ left 50%
212
+ transform translateX(-50%)
213
+ width var(--ph-speccer-line-width)
214
+ height calc(var(--ph-speccer-pin-space) + var(--ph-speccer-line-width))
215
+
216
+ .ph.speccer.dissection.outline.enclose.right,
217
+ .ph.speccer.dissection.outline.enclose.left
218
+ width 8px
219
+
220
+ .ph.speccer.dissection.outline.enclose.top,
221
+ .ph.speccer.dissection.outline.enclose.bottom
222
+ height 8px
223
+
224
+ .ph.speccer.dissection.outline.enclose.right:after,
225
+ .ph.speccer.dissection.outline.enclose.left:after,
226
+ .ph.speccer.dissection.outline.enclose.top:after,
227
+ .ph.speccer.dissection.outline.enclose.bottom:after
228
+ content attr(data-dissection-counter)
229
+ height var(--ph-speccer-pin-size)
230
+ width var(--ph-speccer-pin-size)
231
+ display flex
232
+ position absolute
233
+ border-radius 100%
234
+ background-color var(--ph-speccer-pin-color)
235
+ color var(--ph-speccer-color-text-light)
236
+ align-items center
237
+ justify-content center
238
+ line-height 150%
239
+ font-size 16px
240
+ z-index 100000
241
+
242
+ .ph.speccer.dissection.outline.enclose.right:after,
243
+ .ph.speccer.dissection.outline.enclose.left:after
244
+ top 50%
245
+ transform translateY(-50%)
246
+
247
+ .ph.speccer.dissection.outline.enclose.top:after,
248
+ .ph.speccer.dissection.outline.enclose.bottom:after
249
+ left 50%
250
+ transform translateX(-50%)
251
+
252
+ .ph.speccer.dissection.outline.enclose.right:before,
253
+ .ph.speccer.dissection.outline.enclose.left:before,
254
+ .ph.speccer.dissection.outline.enclose.top:before,
255
+ .ph.speccer.dissection.outline.enclose.bottom:before
256
+ content ""
257
+ position absolute
258
+ background-color var(--ph-speccer-pin-color)
259
+ z-index 100000
260
+ display block
261
+
262
+ .ph.speccer.dissection.outline.enclose.right:before,
263
+ .ph.speccer.dissection.outline.enclose.left:before
264
+ top 50%
265
+ transform translateY(-50%)
266
+ height var(--ph-speccer-line-width)
267
+ width calc(var(--ph-speccer-pin-space) + var(--ph-speccer-line-width))
268
+
269
+ .ph.speccer.dissection.outline.enclose.top:before,
270
+ .ph.speccer.dissection.outline.enclose.bottom:before
271
+ left 50%
272
+ transform translateX(-50%)
273
+ width var(--ph-speccer-line-width)
274
+ height calc(var(--ph-speccer-pin-space) + var(--ph-speccer-line-width))
@@ -0,0 +1,68 @@
1
+ $ph-speccer-color-padding = rgba(219, 111, 255, 0.4);
2
+ $ph-speccer-color-padding-hover = rgb(219, 111, 255);
3
+ $ph-speccer-color-margin = rgba(255, 247, 111, 0.4);
4
+ $ph-speccer-color-margin-hover = rgb(255, 247, 111);
5
+ $ph-speccer-color-text-light = rgb(255, 255, 255);
6
+ $ph-speccer-color-text-dark = rgb(51,51,51);
7
+ $ph-speccer-color-contrast = rgb(255, 58, 168);
8
+ $ph-speccer-spacing-color = $ph-speccer-color-contrast;
9
+ $ph-speccer-measure-color = rgb(255,0,0);
10
+ $ph-speccer-pin-color = $ph-speccer-color-contrast;
11
+ $ph-speccer-typography-background-color = rgb(255, 255,255);
12
+ $ph-speccer-typography-color-property = rgb(63, 133, 242);
13
+ $ph-speccer-typography-color-text = rgb(87, 87, 91);
14
+ $ph-speccer-typography-color-value = $ph-speccer-color-contrast;
15
+ $ph-speccer-depth-opacity-400 = 0.4;
16
+ $ph-speccer-font-family = "Menlo for Powerline", "Menlo Regular for Powerline", "DejaVu Sans Mono", Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
17
+ $ph-speccer-font-size = 12px;
18
+ $ph-speccer-line-height = 12px;
19
+ $ph-speccer-pin-size = 24px
20
+ $ph-speccer-pin-space = 48px
21
+ $ph-speccer-line-width = 1px
22
+ $ph-speccer-line-width-negative = -1px
23
+ $ph-speccer-measure-size = 8px
24
+
25
+
26
+ .ph.speccer
27
+ --ph-speccer-color-padding: $ph-speccer-color-padding;
28
+ --ph-speccer-color-padding-hover: $ph-speccer-color-padding-hover;
29
+ --ph-speccer-color-margin: $ph-speccer-color-margin;
30
+ --ph-speccer-color-margin-hover: $ph-speccer-color-margin-hover;
31
+ --ph-speccer-color-text-light: $ph-speccer-color-text-light;
32
+ --ph-speccer-color-text-dark: $ph-speccer-color-text-dark;
33
+ --ph-speccer-color-contrast: $ph-speccer-color-contrast;
34
+ --ph-speccer-spacing-color: var(--ph-speccer-color-contrast);
35
+ --ph-speccer-measure-color: $ph-speccer-measure-color;
36
+ --ph-speccer-pin-color: var(--ph-speccer-color-contrast);
37
+ --ph-speccer-typography-background-color: $ph-speccer-typography-background-color;
38
+ --ph-speccer-typography-color-property: $ph-speccer-typography-color-property;
39
+ --ph-speccer-typography-color-text: $ph-speccer-typography-color-text;
40
+ --ph-speccer-typography-color-value: var(--ph-speccer-color-contrast);
41
+ --ph-speccer-depth-opacity-400: $ph-speccer-depth-opacity-400;
42
+ --ph-speccer-font-family: $ph-speccer-font-family;
43
+ --ph-speccer-font-size: $ph-speccer-font-size;
44
+ --ph-speccer-line-height: $ph-speccer-line-height;
45
+ --ph-speccer-pin-size: $ph-speccer-pin-size;
46
+ --ph-speccer-pin-space: $ph-speccer-pin-space;
47
+ --ph-speccer-line-width: $ph-speccer-line-width;
48
+ --ph-speccer-line-width-negative: $ph-speccer-line-width-negative;
49
+ --ph-speccer-measure-size: $ph-speccer-measure-size;
50
+
51
+
52
+ .ph.speccer,
53
+ .ph.speccer::after,
54
+ .ph.speccer::before
55
+ font-family var(--ph-speccer-font-family) !important
56
+ justify-content center
57
+ align-items center
58
+ z-index 99999
59
+ position absolute
60
+ pointer-events none
61
+ user-select none
62
+ display flex
63
+ font-size 12px
64
+ box-sizing border-box
65
+ line-height 12px
66
+
67
+ @require './anatomy.styl'
68
+ @require './spacing.styl'
@@ -0,0 +1,88 @@
1
+ .ph.speccer.measure
2
+ &.width
3
+ color var(--ph-speccer-measure-color)
4
+ border var(--ph-speccer-line-width) solid var(--ph-speccer-measure-color)
5
+ border-bottom none
6
+ height var(--ph-speccer-measure-size)
7
+
8
+
9
+ .ph.speccer.measure
10
+ &.width
11
+ &::after
12
+ content attr(data-measure)
13
+ position absolute
14
+ top calc(-100% - 10px)
15
+
16
+
17
+ .ph.speccer.measure
18
+ &.width
19
+ &.bottom
20
+ color var(--ph-speccer-measure-color)
21
+ border var(--ph-speccer-line-width) solid var(--ph-speccer-measure-color)
22
+ border-top none
23
+
24
+
25
+ .ph.speccer.measure
26
+ &.width
27
+ &.bottom
28
+ &::after
29
+ content attr(data-measure)
30
+ position absolute
31
+ top calc(100% + 5px)
32
+
33
+
34
+ .ph.speccer.measure
35
+ &.width
36
+ &.top
37
+ color var(--ph-speccer-measure-color)
38
+ border var(--ph-speccer-line-width) solid var(--ph-speccer-measure-color)
39
+ border-bottom none
40
+
41
+
42
+ .ph.speccer.measure
43
+ &.width
44
+ &.top
45
+ &::after
46
+ content attr(data-measure)
47
+ position absolute
48
+ bottom calc(100% + 5px)
49
+
50
+
51
+ .ph.speccer.measure
52
+ &.height
53
+ &.left
54
+ color var(--ph-speccer-measure-color)
55
+ border var(--ph-speccer-line-width) solid var(--ph-speccer-measure-color)
56
+ border-right none
57
+ width var(--ph-speccer-measure-size)
58
+
59
+
60
+ .ph.speccer.measure
61
+ &.height
62
+ &.left
63
+ &::after
64
+ content attr(data-measure)
65
+ position absolute
66
+ top 50%
67
+ left calc(-100% - 20px - var(--ph-speccer-line-width))
68
+ transform translateY(-50%) rotate(-90deg)
69
+
70
+
71
+ .ph.speccer.measure
72
+ &.height
73
+ &.right
74
+ color var(--ph-speccer-measure-color)
75
+ border var(--ph-speccer-line-width) solid var(--ph-speccer-measure-color)
76
+ border-left none
77
+ width var(--ph-speccer-measure-size)
78
+
79
+
80
+ .ph.speccer.measure
81
+ &.height
82
+ &.right
83
+ &::after
84
+ content attr(data-measure)
85
+ position absolute
86
+ top 50%
87
+ left calc(100% - var(--ph-speccer-measure-size))
88
+ transform translateY(-50%) rotate(90deg)
@@ -0,0 +1,152 @@
1
+ .ph.speccer.spacing
2
+ pointer-events auto
3
+ transition none
4
+ border var(--ph-speccer-line-width) solid transparent
5
+ &:hover
6
+ border var(--ph-speccer-line-width) solid var(--ph-speccer-color-text-dark)
7
+
8
+
9
+ .is-specced
10
+ &:hover
11
+ & ~ .ph.speccer.spacing
12
+ &.margin
13
+ background-color var(--ph-speccer-color-margin-hover)
14
+ &.padding
15
+ background-color var(--ph-speccer-color-padding-hover)
16
+ color var(--ph-speccer-color-text-light)
17
+
18
+
19
+ .ph.speccer.spacing
20
+ &.margin
21
+ background-color var(--ph-speccer-color-margin)
22
+ color var(--ph-speccer-color-text-dark)
23
+
24
+
25
+ .ph.speccer.spacing
26
+ &.padding
27
+ background-color var(--ph-speccer-color-padding)
28
+ color var(--ph-speccer-spacing-color)
29
+
30
+
31
+ .ph.speccer.spacing
32
+ &.margin
33
+ &.bottom,
34
+ &.top
35
+ &::after
36
+ transition none
37
+ content ""
38
+ position absolute
39
+ height 100%
40
+ border-top var(--ph-speccer-line-width) solid var(--ph-speccer-color-text-dark)
41
+ border-bottom var(--ph-speccer-line-width) solid var(--ph-speccer-color-text-dark)
42
+ width 9px
43
+ left 40%
44
+
45
+
46
+ .ph.speccer.spacing
47
+ &.margin
48
+ &.bottom,
49
+ &.top
50
+ &::before
51
+ transition none
52
+ content ""
53
+ position absolute
54
+ height 100%
55
+ border-left var(--ph-speccer-line-width) solid var(--ph-speccer-color-text-dark)
56
+ margin-left 4px
57
+ width 0
58
+ left 40%
59
+
60
+
61
+ .ph.speccer.spacing
62
+ &.margin
63
+ &.left,
64
+ &.right
65
+ &::after
66
+ transition none
67
+ content ""
68
+ position absolute
69
+ height 9px
70
+ border-right var(--ph-speccer-line-width) solid var(--ph-speccer-color-text-dark)
71
+ border-left var(--ph-speccer-line-width) solid var(--ph-speccer-color-text-dark)
72
+ width 100%
73
+ top 10%
74
+
75
+
76
+ .ph.speccer.spacing
77
+ &.margin
78
+ &.left,
79
+ &.right
80
+ &::before
81
+ transition none
82
+ content ""
83
+ position absolute
84
+ height 0
85
+ border-top var(--ph-speccer-line-width) solid var(--ph-speccer-color-text-dark)
86
+ margin-top 4px
87
+ width 100%
88
+ top 10%
89
+
90
+
91
+ .ph.speccer.spacing
92
+ &.padding
93
+ &.bottom,
94
+ &.top
95
+ &::after
96
+ transition none
97
+ content ""
98
+ position absolute
99
+ height 100%
100
+ border-top var(--ph-speccer-line-width) solid var(--ph-speccer-spacing-color)
101
+ border-bottom var(--ph-speccer-line-width) solid var(--ph-speccer-spacing-color)
102
+ width 9px
103
+ left 40%
104
+
105
+
106
+ .ph.speccer.spacing
107
+ &.padding
108
+ &.bottom,
109
+ &.top
110
+ &::before
111
+ transition none
112
+ content ""
113
+ position absolute
114
+ height 100%
115
+ border-left var(--ph-speccer-line-width) solid var(--ph-speccer-spacing-color)
116
+ margin-left 4px
117
+ width 0
118
+ left 40%
119
+
120
+
121
+ .ph.speccer.spacing
122
+ &.padding
123
+ &.left,
124
+ &.right
125
+ &::after
126
+ transition none
127
+ content ""
128
+ position absolute
129
+ height 9px
130
+ border-right var(--ph-speccer-line-width) solid var(--ph-speccer-spacing-color)
131
+ border-left var(--ph-speccer-line-width) solid var(--ph-speccer-spacing-color)
132
+ width 100%
133
+ top 10%
134
+
135
+
136
+ .ph.speccer.spacing
137
+ &.padding
138
+ &.left,
139
+ &.right
140
+ &::before
141
+ transition none
142
+ content ""
143
+ position absolute
144
+ height 0
145
+ border-top var(--ph-speccer-line-width) solid var(--ph-speccer-spacing-color)
146
+ margin-top 4px
147
+ width 100%
148
+ top 10%
149
+
150
+
151
+ @require './typography.styl'
152
+ @require './measure.styl'
@@ -1,6 +1,6 @@
1
- .speccer.typography
2
- background-color #ffffff
3
- color #57575b
1
+ .ph.speccer.typography
2
+ background-color var(--ph-speccer-typography-background-color)
3
+ color var(--ph-speccer-typography-color-text)
4
4
  font-size 12px
5
5
  padding 8px 24px
6
6
  max-width none
@@ -8,21 +8,21 @@
8
8
  display block
9
9
  text-align left
10
10
  line-height 140%
11
- border 1px solid #e227b3
11
+ border var(--ph-speccer-line-width) solid var(--ph-speccer-pin-color)
12
12
  min-width 320px
13
13
 
14
14
  &:hover
15
- border 1px solid #e227b3
15
+ border var(--ph-speccer-line-width) solid var(--ph-speccer-pin-color)
16
16
 
17
17
  &:after
18
18
  content ""
19
19
  position absolute
20
20
  display block
21
- background-color #e227b3
21
+ background-color var(--ph-speccer-pin-color)
22
22
  left 100%
23
23
  top 50%
24
24
  transform translateY(-50%)
25
- height 1px
25
+ height var(--ph-speccer-line-width)
26
26
  width 48px
27
27
 
28
28
  &.left
@@ -30,7 +30,7 @@
30
30
  left 100%
31
31
  top 50%
32
32
  transform translateY(-50%)
33
- height 1px
33
+ height var(--ph-speccer-line-width)
34
34
  width 48px
35
35
  &.right
36
36
  &:after
@@ -38,7 +38,7 @@
38
38
  right 100%
39
39
  top 50%
40
40
  transform translateY(-50%)
41
- height 1px
41
+ height var(--ph-speccer-line-width)
42
42
  width 48px
43
43
  &.top
44
44
  &:after
@@ -47,7 +47,7 @@
47
47
  top 100%
48
48
  transform translateX(-50%)
49
49
  height 48px
50
- width 1px
50
+ width var(--ph-speccer-line-width)
51
51
  &.bottom
52
52
  &:after
53
53
  left 50%
@@ -56,7 +56,7 @@
56
56
  bottom 100%
57
57
  transform translateX(-50%)
58
58
  height 48px
59
- width 1px
59
+ width var(--ph-speccer-line-width)
60
60
 
61
61
  & .speccer-styles
62
62
  list-style none
@@ -69,7 +69,7 @@
69
69
 
70
70
  & .property
71
71
  font-weight normal
72
- color #3f85f2
72
+ color var(--ph-speccer-typography-color-property)
73
73
  text-align left
74
74
  padding 0
75
75
  font-size 12px
@@ -77,7 +77,7 @@
77
77
 
78
78
  & > li
79
79
  font-weight normal
80
- color #e227b3
80
+ color var(--ph-speccer-typography-color-value)
81
81
  text-align left
82
82
  padding 0
83
83
  font-size 12px