Skip to content

Commit e25bcb4

Browse files
author
Guillaume Chau
committed
refactor(widget): resize handler style moved to global
1 parent 9d8a4f2 commit e25bcb4

File tree

2 files changed

+42
-39
lines changed

2 files changed

+42
-39
lines changed

packages/@vue/cli-ui/src/components/Widget.vue

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -435,45 +435,6 @@ $zoom = .7
435435
/deep/ > *
436436
transform scale(1/$zoom)
437437
438-
.resize-handle
439-
position absolute
440-
width 12px
441-
height @width
442-
border-radius 50%
443-
background rgba($vue-ui-color-primary, .5)
444-
&:hover
445-
background $vue-ui-color-primary
446-
&.top,
447-
&.top-left,
448-
&.top-right
449-
top (-@height / 2)
450-
&.bottom,
451-
&.bottom-left,
452-
&.bottom-right
453-
bottom (-@height / 2)
454-
&.left,
455-
&.top-left,
456-
&.bottom-left
457-
left (-@width / 2)
458-
&.right,
459-
&.top-right,
460-
&.bottom-right
461-
right (-@width / 2)
462-
&.top,
463-
&.bottom
464-
left calc(50% - (@width / 2))
465-
cursor ns-resize
466-
&.left,
467-
&.right
468-
top calc(50% - (@height / 2))
469-
cursor ew-resize
470-
&.top-left,
471-
&.bottom-right
472-
cursor nwse-resize
473-
&.top-right,
474-
&.bottom-left
475-
cursor nesw-resize
476-
477438
.move-ghost,
478439
.resize-ghost
479440
z-index 10000

packages/@vue/cli-ui/src/style/main.styl

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,3 +182,45 @@ ansi-colors('white', $vue-ui-color-light)
182182

183183
.token.punctuation
184184
color lighten(#999, 20%)
185+
186+
// Resizing
187+
188+
.resize-handle
189+
position absolute
190+
width 12px
191+
height @width
192+
border-radius 50%
193+
background rgba($vue-ui-color-primary, .5)
194+
&:hover
195+
background $vue-ui-color-primary
196+
&.top,
197+
&.top-left,
198+
&.top-right
199+
top (-@height / 2)
200+
&.bottom,
201+
&.bottom-left,
202+
&.bottom-right
203+
bottom (-@height / 2)
204+
&.left,
205+
&.top-left,
206+
&.bottom-left
207+
left (-@width / 2)
208+
&.right,
209+
&.top-right,
210+
&.bottom-right
211+
right (-@width / 2)
212+
&.top,
213+
&.bottom
214+
left calc(50% - (@width / 2))
215+
cursor ns-resize
216+
&.left,
217+
&.right
218+
top calc(50% - (@height / 2))
219+
cursor ew-resize
220+
&.top-left,
221+
&.bottom-right
222+
cursor nwse-resize
223+
&.top-right,
224+
&.bottom-left
225+
cursor nesw-resize
226+

0 commit comments

Comments
 (0)