|
1 | 1 | @import "colors.less"; |
2 | 2 |
|
3 | | -@half-line-height-unit: ~"calc(var(--editor-line-height) / 2)"; |
4 | | -@half-line-height-nounit: ~"calc(var(--editor-line-height) * 1em / 2)"; |
5 | | -//@line-padding-unit: ~"calc(var(--editor-line-height) - 1em)"; |
6 | | -//@line-padding-nounit: ~"calc(var(--editor-line-height) * 1em - 1em)"; |
7 | | -@half-line-padding-unit: ~"calc((var(--editor-line-height) - 1em) / 2)"; |
8 | | -@half-line-padding-nounit: ~"calc((var(--editor-line-height) * 1em - 1em) / 2)"; |
9 | | -@indent-width-unit: ~"calc(0.5em + (var(--editor-line-height) - 1em) / 4)"; |
10 | | -@indent-width-nounit: ~"calc(0.5em + (var(--editor-line-height) * 1em - 1em) / 4)"; |
11 | | - |
| 3 | +@half-line-height: ~"calc(var(--editor-line-height) * 1em / 2)"; |
| 4 | +@half-line-padding: ~"calc((var(--editor-line-height) * 1em - 1em) / 2)"; |
12 | 5 |
|
13 | 6 |
|
14 | 7 | .syntax--source.syntax--js .syntax--string.syntax--regexp > .syntax--meta.syntax--pattern { |
|
24 | 17 | background-color: @group-bg; |
25 | 18 | padding: 1px 0; |
26 | 19 | position: relative; |
27 | | - //border-radius: @half-line-height-unit; |
28 | | - //border-radius: @half-line-height-nounit; |
29 | 20 |
|
30 | 21 | //lines above and below group content |
31 | 22 | &::before { |
|
34 | 25 | display: block; |
35 | 26 | border: 1px solid @group-delimiter; |
36 | 27 | border-width: 1px 0; |
37 | | - inset: -1px @half-line-height-unit; |
38 | | - inset: -1px @half-line-height-nounit; |
| 28 | + inset: -1px @half-line-height; |
39 | 29 | } |
40 | 30 | &.syntax--capturing::before { |
41 | 31 | border-color: @group-delimiter-capturing; |
|
60 | 50 | &.syntax--end::after { |
61 | 51 | content: ""; |
62 | 52 | position: absolute; |
63 | | - width: @half-line-height-unit; |
64 | | - width: @half-line-height-nounit; |
| 53 | + width: @half-line-height; |
65 | 54 | } |
66 | 55 |
|
67 | 56 | &.syntax--begin::before { |
68 | | - inset: 1px auto 2px @half-line-padding-unit; |
69 | | - inset: 1px auto 2px @half-line-padding-nounit; |
| 57 | + inset: 1px auto 2px @half-line-padding; |
70 | 58 | border-top-left-radius: 100% 50%; |
71 | 59 | border-bottom-left-radius: 100% 50%; |
72 | 60 | box-shadow: |
|
76 | 64 | } |
77 | 65 |
|
78 | 66 | &.syntax--end::after { |
79 | | - inset: 1px @half-line-padding-unit 2px auto; |
80 | | - inset: 1px @half-line-padding-nounit 2px auto; |
| 67 | + inset: 1px @half-line-padding 2px auto; |
81 | 68 | border-top-right-radius: 100% 50%; |
82 | 69 | border-bottom-right-radius: 100% 50%; |
83 | 70 | box-shadow: |
|
106 | 93 | } |
107 | 94 | } |
108 | 95 |
|
109 | | -.line > :first-child > .syntax--source.syntax--js:first-child > .syntax--string.syntax--regexp:first-child > .syntax--meta.syntax--pattern:first-child { |
| 96 | +//adjustments for breaks in a wrapped line |
| 97 | +.line .syntax--source.syntax--js .syntax--string.syntax--regexp > .syntax--meta.syntax--pattern { |
110 | 98 |
|
111 | | - > .syntax--meta.syntax--pattern:first-child > .syntax--meta.syntax--group:first-child, |
112 | | - .syntax--meta.syntax--group:first-child { |
| 99 | + > .syntax--meta.syntax--group:first-child, |
| 100 | + :not(.syntax--invalid) > .syntax--meta.syntax--group:first-child { |
113 | 101 |
|
114 | 102 | &::before { |
115 | | - left: @indent-width-unit; |
116 | | - left: @indent-width-nounit; |
| 103 | + left: 0; |
117 | 104 | } |
118 | 105 | } |
119 | | - :not(:first-child) .syntax--meta.syntax--group:first-child { |
| 106 | + :not(.syntax--invalid):not(:first-child) .syntax--meta.syntax--group:first-child { |
120 | 107 |
|
121 | 108 | &::before { |
122 | | - left: @half-line-height-unit; |
123 | | - left: @half-line-height-nounit; |
| 109 | + left: @half-line-height; |
124 | 110 | } |
125 | 111 | } |
126 | 112 | } |
127 | | -/*.line > :first-child > .syntax--source.syntax--js:first-child > .syntax--string.syntax--regexp:first-child { |
128 | | - .syntax--meta.syntax--group:first-child { |
129 | | - border-top-left-radius: 0; |
130 | | - border-bottom-left-radius: 0; |
| 113 | +.line .syntax--source.syntax--js .syntax--string.syntax--regexp > .syntax--meta.syntax--pattern { |
| 114 | + |
| 115 | + > .syntax--meta.syntax--group:last-child, |
| 116 | + :not(.syntax--invalid) > .syntax--meta.syntax--group:last-child { |
| 117 | + |
| 118 | + &::before { |
| 119 | + right: 0; |
| 120 | + } |
131 | 121 | } |
132 | | - :not(:first-child) .syntax--meta.syntax--group:first-child { |
133 | | - border-top-right-radius: @line-padding-unit 50%; |
134 | | - border-top-right-radius: @line-padding-nounit 50%; |
135 | | - border-bottom-right-radius: @line-padding-unit 50%; |
136 | | - border-bottom-right-radius: @line-padding-nounit 50%; |
| 122 | + :not(.syntax--invalid):not(:last-child) .syntax--meta.syntax--group:last-child { |
| 123 | + |
| 124 | + &::before { |
| 125 | + right: @half-line-height; |
| 126 | + } |
137 | 127 | } |
138 | 128 | } |
139 | | -.line > :last-child > .syntax--source.syntax--js:last-child > .syntax--string.syntax--regexp:last-child { |
140 | | - .syntax--meta.syntax--group:last-child { |
141 | | - border-top-right-radius: 0; |
142 | | - border-bottom-right-radius: 0; |
143 | | - } |
144 | | - :not(:last-child) .syntax--meta.syntax--group:last-child { |
145 | | - border-top-left-radius: @line-padding-unit 50%; |
146 | | - border-top-left-radius: @line-padding-nounit 50%; |
147 | | - border-bottom-left-radius: @line-padding-unit 50%; |
148 | | - border-bottom-left-radius: @line-padding-nounit 50%; |
149 | | - } |
150 | | -}*/ |
0 commit comments