cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              h1 Daily CSS Images :: 30 - Bar Graph Icon
  small By Kim Doberstein

#container
  #graph
    .bar
    .bar
    .bar
    .bar
    

.description
  h2 What  did I learn?
  p While trying to come up with colors, I remembered Adobe's Color CC site (aka kuler).  This lovely theme is from: https://color.adobe.com/40-segundos-color-theme-8588550/
  
  p I just eyeballed the radius for the bars.  They all need to be tweaked because it is a percentage of the height.  I really need to get out of the business of "eyeballing" and have SCSS do the calculations for me.
            
          
!
            
              /****************** DESCRIPTION ****************/
h1{
  font-family: 'Pacifico', cursive;
  color:#333;
  font-size:5vw;
  small{
    display:block;
    margin-left:10%;
    color:#666;
  }
}

.description{
  font-family: 'Open Sans', sans-serif;
}
/************************************************/

#container{
  border:1px solid #000;
  position: relative;
  margin: auto;
  width: 75%;
  padding:20px;
}
/******************* VARS **********************/
$heightToWidthRatio:1; 
$bgColor:#fff;//#F1E8E3;

/******************* MIXINS **********************/
@mixin square($widthSize, $heightToWidthRatio){
  /* for example 5/4 ratio would be 1.25 */
  height:calc(#{$widthSize}/#{$heightToWidthRatio});
  width:$widthSize;
}
@mixin circle($radiusWidth, $heightToWidthRatio){
  @include square($radiusWidth, $heightToWidthRatio);
  border-radius:50%;
}
@mixin size($widthPercent, $heightPercent){
  width:$widthPercent;
  height:$heightPercent;
}

@mixin position($left, $top){
  left:$left;
  top:$top;
}
@mixin sizePosition($widthPercent, $heightPercent,$left, $top){
  @include size($widthPercent, $heightPercent);
  @include position($left, $top);
}


/******************* MY IMAGE **********************/


#graph{
  background-color:$bgColor;
  width: 100%;
  padding-bottom:calc(#{$heightToWidthRatio}*100%);
  position:relative;
  *, *:before, *:after, &:after{
    position:absolute;
    content:'';
    z-index:200;
  }
  &:after{
    background-color:#666;
    width:100%;
    height:10%;
    bottom:0;
    border-radius: 5%/50%;
  }
  .bar{
    width:15%;
    bottom:0;
   // border-radius: 50%/10%;
    // buffer is 6.667%
    &:nth-child(1){height:40%;left:10%;background-color:#F49F67; border-radius: 50%/16%;}
    &:nth-child(2){height:51%;left:31.67%; background-color:#FF608C; border-radius: 50%/13%;}
    &:nth-child(3){height:65%;left:53.37%; background-color:#A05AE7; border-radius: 50%/10%;}
    &:nth-child(4){height:95%;right:10%;background-color:#5697FE; border-radius: 50%/8%;}
    
   
  }
}

            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console