cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

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.

            
              .fill-height-or-more
  .control-panel
    .title Dashboard
    .body-text As luck would have it
    
    .bt This was rather run to figure out.
    .bt Dividing the page in two full-height columns took some figuring out and reading. It didn't work with grid, but it did work with flex. Yay!
    .bt The chart side was done entirely with grid, using it as a masonry fill-in, letting the charts just fill in where they can. So fun!
    
  .content
    .title Approximate Growth Rates of Bornagles
    
    .chart-grid
      .chart.main-chart
        %img{src: "http://pandas-xlsxwriter-charts.readthedocs.io/_images/chart_grouped_column_farms.png"}
      .chart.sub-chart
        %img{src: "https://docs.oracle.com/javase/8/javafx/user-interface-tutorial/img/pie-sample.png"}
      .chart.sub-chart
        %img{src: "https://docs.oracle.com/javase/8/javafx/user-interface-tutorial/img/pie-sample.png"}
      .chart.sub-chart
        %img{src: "https://docs.oracle.com/javase/8/javafx/user-interface-tutorial/img/pie-sample.png"}
      .chart.sub-chart
        %img{src: "https://docs.oracle.com/javase/8/javafx/user-interface-tutorial/img/pie-sample.png"}
      .chart.wide-chart
        %img{src:"http://blog.mailchimp.com/wp-content/uploads/2011/09/html5charts-before.jpg"}
      .chart
        %img{src: "https://canvasjs.com/wp-content/uploads/images/gallery/jquery-charts/jquery-column-chart.jpg"}
      .chart
        %img{src: "https://pbs.twimg.com/profile_images/816245223080820737/xP8Z-rdD.jpg"}
      .chart
        %img{src: "https://blogs.office.com/wp-content/uploads/2015/08/Breaking-down-hierarchical-data-with-Treemap-and-Sunburst-charts-6.png"}
      .chart
        %img{src: "https://res.cloudinary.com/buddahbelly/image/upload/v1418305005/ng3-charts/ng3-charts.png"}
      .chart
        %img{src: "http://charting.nasdaq.com/ext/charts.dll?2-1-14-0-0-512-03NA000000NUGT-&SF:1%7C5-BG=FFFFFF-BT=0-WD=635-HT=395-"}
      
            
          
!
            
              // see https://css-tricks.com/boxes-fill-height-dont-squish/
html, body
  height: 100% // it doesn't stretch to the bottom of the screen without this
    
.fill-height-or-more
  min-height: 100%
  display: flex
  flex-direction: row
  
  > div
    display: flex
    flex-direction: column
    justify-content: top

.control-panel
  flex-grow: 1
  flex-shrink: 1
  flex-basis: 35%

.content
  flex-grow: 2
  flex-shrink: 1
  flex-basis: auto

// this stuff makes it pretty
  
html, body
  font-family: "Helvetica Neue"
  line-height: 1.2
  font-size: 21px
  background-color: red // this shows up any missing areas
  
.body-text,.bt
  margin-bottom: 0.6em
  
.title
  font-size: 2em
  margin-bottom: 1em

.control-panel
  background-color: rebeccapurple
  padding: 1em
  color: papayawhip
  .title
    color: mintcream

.content 
  background-color: mintcream
  padding: 1em
  color: slategrey
  .title
    color: paleVioletRed

.chart-grid
  max-width: 100%
  display: grid
  grid-template-columns: repeat(4, 25%)
  
.chart
  border: 1px solid red
  img
    max-width: 100%
  
.wide-chart
  grid-column: 1 / 5
  
.main-chart
  grid-column: 1 / 3
  grid-row: 1 / 3
  
.sub-chart
  max-width: 50%
  margin: auto
    
            
          
!
999px
Loading ..................

Console