Search
 
SCRIPT & CODE EXAMPLE
 

CSS

sass loop columns

------HTML-----------
<div class="grid-1">1</div>
<div class="grid-11">11</div>
<div class="grid-2">2</div>
<div class="grid-10">10</div>
<div class="grid-3">3</div>
<div class="grid-9">9</div>
<div class="grid-4">4</div>
<div class="grid-8">8</div>
<div class="grid-5">5</div>
<div class="grid-7">7</div>
<div class="grid-6">6</div>
<div class="grid-6">6</div>
<div class="grid-12">12</div>

------CSS---------
$grid-columns: 12;

@for $i from 1 through $grid-columns {
  .grid-#{$i} {
    width: percentage($i / $grid-columns);
  }
}


// styles
[class^='grid-'] {
  border: 1px solid;
  box-sizing: border-box;
  float: left;
  padding: 1em 0;
  text-align: center;
}
Comment

PREVIOUS NEXT
Code Example
Css :: cs and cd in jfet 
Css :: animation-direction property 
Css :: css fill div with background image 
Css :: transition delay css 
Css :: element not going to the bottom of the page 
Css :: how to make image same size as text css 
Css :: codeigniter return last inserted id 
Css :: unclickable button 
Css :: blur css 
Css :: css change text spacing 
Css :: css regions 
Css :: line under text css 
Css :: left and right box shadow only 
Css :: Changing to custom font in angular material 12 
Css :: How to make a round corner in CSS 
Css :: media query for mobile min and max width 
Css :: make button stretch to fit text 
Css :: how to write css like a pro 
Css :: loops scss 
Css :: align text in center css 
Css :: background image css stack overflow 
Css :: custom horizontal scrollbar css 
Css :: media query for mobile landscape only 
Css :: set svg background color css 
Css :: centre align in position absolute 
Css :: remove scrollbars scroll 
Css :: force aspect ratio div 
Css :: align items center css 
Css :: background properties css 
Css :: how to create space inbetween text css 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =