Skip to content

Commit 80f35de

Browse files
committed
restore some CSS specificity
so we don't break existing side panel grid item...
1 parent 3f97843 commit 80f35de

File tree

3 files changed

+20
-13
lines changed

3 files changed

+20
-13
lines changed

demo/demo.css

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,20 @@ h1 {
4444
background: rgba(0, 255, 0, 0.1);
4545
padding: 25px 0;
4646
height: 100px;
47+
text-align: center;
4748
}
4849
.sidebar .grid-stack-item {
49-
display: inline-block;
50-
position: relative;
5150
width: 120px;
5251
height: 50px;
52+
border: 2px dashed green;
5353
text-align: center;
5454
line-height: 35px;
55+
background: rgba(0, 255, 0, 0.1);
56+
cursor: default;
57+
display: inline-block;
5558
}
5659
.sidebar .grid-stack-item .grid-stack-item-content {
57-
width: 100%;
58-
height: 100%;
60+
background: none;
5961
}
6062

6163
/* make nested grid have slightly darker bg take almost all space (need some to tell them apart) so items inside can have similar to external size+margin */

doc/CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Change log
55
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
66
**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*
77

8+
- [8.0.2 TBD](#802-tbd)
89
- [8.0.1 (2023-04-29)](#801-2023-04-29)
910
- [8.0.0 (2023-04-29)](#800-2023-04-29)
1011
- [7.3.0 (2023-04-01)](#730-2023-04-01)

src/gridstack.scss

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,21 @@ $animation_speed: .3s !default;
3737
z-index: 0 !important;
3838
}
3939

40-
.grid-stack-item-content {
41-
margin: 0;
40+
// make those more unique as to not conflict with side panel items
41+
.grid-stack > .grid-stack-item {
4242
position: absolute;
43-
width: auto;
44-
overflow-x: hidden;
45-
overflow-y: auto;
43+
padding: 0;
44+
45+
> .grid-stack-item-content {
46+
margin: 0;
47+
position: absolute;
48+
width: auto;
49+
overflow-x: hidden;
50+
overflow-y: auto;
51+
}
4652
}
4753

4854
.grid-stack-item {
49-
position: absolute;
50-
padding: 0;
51-
5255
> .ui-resizable-handle {
5356
position: absolute;
5457
font-size: 0.1px;
@@ -129,7 +132,8 @@ $animation_speed: .3s !default;
129132
@include vendor(transition, left 0s, top 0s, height 0s, width 0s);
130133
}
131134

132-
.grid-stack-item[gs-x="0"] {
135+
// make those more unique as to not conflict with side panel items
136+
.grid-stack > .grid-stack-item[gs-x="0"] {
133137
left: 0%;
134138
}
135139

0 commit comments

Comments
 (0)