Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 409e401

Browse files
committed
resize handles
1 parent be4c6fc commit 409e401

File tree

1 file changed

+65
-18
lines changed

1 file changed

+65
-18
lines changed

src/gridstack.css

Lines changed: 65 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
padding: 0;
88
}
99

10-
.grid-stack-item .grid-stack-item-content,
11-
.grid-stack-item .placeholder-content {
10+
.grid-stack-item > .grid-stack-item-content,
11+
.grid-stack-item > .placeholder-content {
1212
margin: 0;
1313
position: absolute;
1414
top: 0;
@@ -20,7 +20,7 @@
2020
overflow: auto;
2121
}
2222

23-
.grid-stack-placeholder .placeholder-content {
23+
.grid-stack-placeholder > .placeholder-content {
2424
border: 1px dashed lightgray;
2525
}
2626

@@ -29,26 +29,28 @@
2929
z-index: 100;
3030
}
3131

32-
.grid-stack-item.ui-draggable-dragging .grid-stack-item-content,
33-
.grid-stack-item.ui-resizable-resizing .grid-stack-item-content {
32+
.grid-stack-item.ui-draggable-dragging > .grid-stack-item-content,
33+
.grid-stack-item.ui-resizable-resizing > .grid-stack-item-content {
3434
box-shadow: 1px 4px 6px rgba(0, 0, 0, 0.2);
3535
opacity: 0.8;
3636
}
3737

38-
.grid-stack-item .ui-resizable-handle {
39-
padding: 3px;
40-
margin: 3px 0;
41-
cursor: nwse-resize;
42-
color: gray;
38+
.grid-stack-item > .ui-resizable-handle {
39+
}
4340

44-
position: absolute;
45-
bottom: 0;
46-
right: 15px;
41+
:root .grid-stack-item > .ui-resizable-handle {
42+
filter: none;
43+
}
4744

48-
font-size: 10px;
45+
.grid-stack-item > .ui-resizable-se {
46+
text-align: right;
47+
color: gray;
48+
49+
padding: 2px 3px 0 0;
50+
margin: 0;
4951

5052
display: inline-block;
51-
font: normal normal normal 14px/1 FontAwesome;
53+
font: normal normal normal 10px/1 FontAwesome;
5254
font-size: inherit;
5355
text-rendering: auto;
5456
-webkit-font-smoothing: antialiased;
@@ -60,14 +62,59 @@
6062
transform: rotate(90deg);
6163
}
6264

63-
:root .grid-stack-item .ui-resizable-handle {
64-
filter: none;
65+
/** Uncomment this to show bottom-left resize handle **/
66+
/*
67+
.grid-stack-item > .ui-resizable-sw {
68+
text-align: right;
69+
color: gray;
70+
71+
padding: 2px 3px 0 0;
72+
margin: 0;
73+
74+
display: inline-block;
75+
font: normal normal normal 10px/1 FontAwesome;
76+
font-size: inherit;
77+
text-rendering: auto;
78+
-webkit-font-smoothing: antialiased;
79+
-moz-osx-font-smoothing: grayscale;
80+
81+
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
82+
-webkit-transform: rotate(180deg);
83+
-ms-transform: rotate(180deg);
84+
transform: rotate(180deg);
85+
}
86+
87+
.grid-stack-item .ui-resizable-sw::before {
88+
content: "\f065";
6589
}
90+
*/
6691

67-
.grid-stack-item .ui-resizable-handle::before {
92+
.grid-stack-item > .ui-resizable-se::before {
6893
content: "\f065";
6994
}
7095

96+
.ui-resizable-handle {
97+
position: absolute;
98+
font-size: 0.1px;
99+
display: block;
100+
-ms-touch-action: none;
101+
touch-action: none;
102+
}
103+
104+
.grid-stack-item.ui-resizable-disabled > .ui-resizable-handle,
105+
.grid-stack-item.ui-resizable-autohide > .ui-resizable-handle {
106+
display: none;
107+
}
108+
109+
.grid-stack-item > .ui-resizable-nw { cursor: nw-resize; width: 20px; height: 20px; left: 10px; top: 0; }
110+
.grid-stack-item > .ui-resizable-n { cursor: n-resize; height: 10px; top: 0; left: 25px; right: 25px; }
111+
.grid-stack-item > .ui-resizable-ne { cursor: ne-resize; width: 20px; height: 20px; right: 10px; top: 0; }
112+
.grid-stack-item > .ui-resizable-e { cursor: e-resize; width: 10px; right: 10px; top: 15px; bottom: 15px; }
113+
.grid-stack-item > .ui-resizable-se { cursor: se-resize; width: 20px; height: 20px; right: 10px; bottom: 0; }
114+
.grid-stack-item > .ui-resizable-s { cursor: s-resize; height: 10px; left: 25px; bottom: 0; right: 25px; }
115+
.grid-stack-item > .ui-resizable-sw { cursor: sw-resize; width: 20px; height: 20px; left: 10px; bottom: 0; }
116+
.grid-stack-item > .ui-resizable-w { cursor: w-resize; width: 10px; left: 10px; top: 15px; bottom: 15px; }
117+
71118
.grid-stack-item { min-width: 8.33333333% }
72119

73120
.grid-stack-item[data-gs-width="12"] { width: 100% }

0 commit comments

Comments
 (0)