Skip to content

remove min/max CSS #2243

Closed
Closed
@adumesny

Description

@adumesny

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; }
  }
} 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions