Skip to content

Commit c8ecb98

Browse files
authored
refactor: clearing floats in a modern way (#1362)
As the previous solution with overflow(-x) leads to several problems
1 parent ad16f6f commit c8ecb98

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/uikit-workshop/src/sass/pattern-lab.scss

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,19 @@
105105
}
106106

107107
.pl-c-main {
108-
overflow-x: hidden;
108+
// Preventing cropping pattern parts #1174 - absolutely positioned pattern parts at the vertical end of the "page" would get cropped elsewhere
109109
min-height: 100vh;
110+
110111
max-width: 100vw;
111112
padding-left: .5rem;
112113
padding-right: .5rem;
114+
115+
// Clearing all remaining floats
116+
&::after {
117+
clear: both;
118+
content: "";
119+
display: table;
120+
}
113121
}
114122

115123
/*------------------------------------*\

0 commit comments

Comments
 (0)