Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove min/max CSS #2243

Closed
adumesny opened this issue Mar 27, 2023 · 0 comments · Fixed by #2256, #2257, #2258 or #2259
Closed

remove min/max CSS #2243

adumesny opened this issue Mar 27, 2023 · 0 comments · Fixed by #2256, #2257, #2258 or #2259

Comments

@adumesny
Copy link
Member

adumesny commented Mar 27, 2023

Subject of the issue

today we use CSS for min/max but I really don't see why since the interaction is in code and not using CSS to constrain - might as well only set it during resizing on the clone if at all...

@use "sass:math";
.grid-stack > .grid-stack-item {

  $gridstack-columns: 12;

  min-width: 100%/$gridstack-columns;

  @for $i from 0 through $gridstack-columns {
    &[gs-w='#{$i}'] { width: (100% / $gridstack-columns) * $i; }
    &[gs-x='#{$i}'] { left: (100% / $gridstack-columns) * $i; }
    &[gs-min-w='#{$i}'] { min-width: (100% / $gridstack-columns) * $i; }
    &[gs-max-w='#{$i}'] { max-width: (100% / $gridstack-columns) * $i; }
  }
} 
adumesny added a commit to adumesny/gridstack.js that referenced this issue Apr 9, 2023
* fix gridstack#2243
* removed `gs-min|max_w|h` attribute  generated in CSS or written out as they are never used for rendering, only for initial load. This reduce our column/row styles in half!
adumesny added a commit to adumesny/gridstack.js that referenced this issue Apr 9, 2023
* fix gridstack#2243
* removed `gs-min|max_w|h` attribute  generated in CSS or written out as they are never used for rendering, only for initial load. This reduce our column/row styles in half!
adumesny added a commit to adumesny/gridstack.js that referenced this issue Apr 9, 2023
*fix gridstack#2243
* also removed `gs-w='1'` and `gs-h='1'` dom attribute writing since we already have min-width/min-height set, no need to set more attributes.
adumesny added a commit to adumesny/gridstack.js that referenced this issue Apr 9, 2023
* fix gridstack#2243
* also removed `gs-w='1'` and `gs-h='1'` dom attribute writing since we already have min-width/min-height set, no need to set more attributes.
adumesny added a commit to adumesny/gridstack.js that referenced this issue Apr 9, 2023
* more fix gridstack#2243
* remove `'ui-draggable'` and `'ui-resizable'` since wasn't used in CSS and we have the `-disabled` version when off (so we can use `not(xyz-disabled)`).
@adumesny adumesny changed the title remove min-max CSS remove min/max CSS Apr 9, 2023
adumesny added a commit to adumesny/gridstack.js that referenced this issue Apr 9, 2023
@adumesny adumesny mentioned this issue Apr 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant