Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <body>
  <textarea id="source">

    class: middle

    # CSS Grid

    ---
    
    class: middle

    # Topics

    #### 1. What Is CSS Grid?
    #### 2. The Problem
    #### 3. The Solution
    #### 4. Release
    #### 5. Support
    #### 6. Upcoming Improvements
    
    ---
    
    class: middle
    
    ### What is CSS Grid
    
    ---
    
    class: middle
    
    ### What is CSS Grid
    A modern CSS display mode that allows us to create responsive multi-column layouts.
    
    ---
    
    class: middle
    
    ### What is CSS Grid
    A modern CSS display mode that allows us to create responsive multi-column layouts. And more!
    
    ---
    
    class: middle
    
    ### Other Uses:
    - Centering elements vertically and horizontally
    - Overlapping and stacking without absolute positioning
    
    ---
    
    class: middle
    
    ### What is the problem that CSS Grid solves?
    
    ---
    
    class: middle
    
    ### What is the problem that CSS Grid solves?
    Previous to Grid, responsive grid layouts were created using floats (not designed for layouts) or Flexbox (only allows us to wrap items, does not affect them both horizontally _and_ vertically). 
    
    Both approaches take a lot more code to create a repsonsive multicolumn layout, compared to grid.
    
    ---
    
    class: middle
    
    ### What is the solution?
    
    ---
    
    class: middle
    
    ### What is the solution?
    CSS Grid! It allows you to affect elements in a grid both horizontally and vertically, and includes powerful properties that allow us to write a fraction of the code previously needed to achieve a grid layout. It also includes a gap property to make styling gutters easier. 
    
    Another advantage is it separates CSS from HTML, in that we can apply grid to any container and achieve our desired result, rather than having to create specific markup to work with Flexbox or floats.
    
    ---
    
    class: middle
    
    ### Release
    CSS Grid was released in January 2017 on Chrome and Firefox, followed by Safari and Opera a month later. Even IE11 had a primitive version of the spec built in that you could leverage with polyfills!
    
    ---
    
    class: middle
    
    ### Support
    CSS Grid has almost 96% support according to caniuse.com! We should all be using it! Even newer features like "gap", "repeat", and "minmax" have almost 95% support.
    
    ---
    
    class: middle
    
    ### Upcoming Improvements
    Level 2 & 3 of the CSS grid spec will inclide things like masonry layout, subgrid, align/justify tracks and line names.
    
    ---
    
    class: middle
    
    ### Learning
    
    - [Grid.io By Wes Bos](https://cssgrid.io/)
    - [Webpack 5 Basics](https://www.youtube.com/watch?v=X1nxTjVDYdQ)
    - [Layout Land with Jen Simmons](https://www.youtube.com/channel/UC7TizprGknbDalbHplROtag)
    - [CSS Tricks Complete Guide to Grid](https://css-tricks.com/snippets/css/complete-guide-grid/)

    ---
    
    class: middle
    
    # Thanks for watching!
    

  </textarea>
  <script src="https://remarkjs.com/downloads/remark-latest.min.js">
  </script>
  <script>
    var slideshow = remark.create();
  </script>
</body>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Heebo:300,400,500,700|Inconsolata');


/* Global Styles */
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.remark-container {
  background-color: #111;
}
.remark-slide-content h1, .remark-slide-content h2 {
  font-weight: 500;
}
.remark-slide-content p, .remark-slide-content li, .remark-slide-content td, .remark-slide-content th {
  font-size: 24px;
  line-height: 1.6;
}
pre, .remark-code, .remark-inline-code {
  background-color: #333;
  color: #f6f6f6;
	font-family: Inconsolata, monospace;
  font-size: 16px;
  padding: 3px;
}
th {
	border-bottom: 1px solid black;
}
td, th {
	padding: 8px;
}
img {
  display: block;
  max-width:100%;
  max-height:100%;
  width: auto;
  height: auto;
}
.center img {
  margin-right: auto;
  margin-left: auto;
}
.smaller p, .smaller div, .smaller li, .smaller th, .smaller td {
	font-size: 18pt;
}
.footnote p {
	position: absolute;
	bottom: 3em;
	font-size: 8pt !important;
}
.remark-slide-number {
	background-color: white;
	padding: 0 5px;
	border-radius: 5px;
	font-size: 20px !important;
}
.no-number .remark-slide-number {
	display: none;
}
#qrcode {
  width: 384px;
  height: 384px;
}

/* Title Slide Layout. Use .smokescreen[...] to contain the h1/h2. */
.remark-slide-content.title h1, .remark-slide-content.title h2, .remark-slide-content.title h3 {
	color: white;
	font-size: 50pt;
	margin: 30pt;
	font-weight: 300;
}
.remark-slide-content.title h2 {
	font-size: 30pt;
}
.remark-slide-content.title h3 {
	font-size: 22pt;
}
.smokescreen {
	width: 100%;
	position: absolute;
	left: 0px;
	top: 33%;
	background-color: rgba(0,0,0,.7);
	vertical-align: middle;
	text-align: center;
}

/* Columnar Layouts. Two- and three-column layouts use .col classnames and float
 * next to each other. The img-right uses .col and .rc (for right-column) and
 * they're not equal-width or height. For convenience, two-column layouts also
 * allow you to name the right column with .rc classname, so you can switch
 * between layouts without changing the markup, just the slide's class.
 */

/* Two-Column Layout */
.two-column .rc, .two-column .col {
	width: 48%;
	float: left;
	margin-right: 1%;
}
.two-column .rc img, .two-column .col img, .three-column .col img, .three-column .rc img {
	display: block;
	min-width: 100%;
	min-height: 100%;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0;
}

/* Two-Column Layout, Text Left, Image Right */
.img-right .col {
	width: 62.5%;
   padding-right: 1em;
}
.img-right .rc {
	position: absolute;
	top: 0;
	left: 62.5%;
	width: 37.5%;
	height: 100%;
	margin: 0;
	padding: 0;
}
.img-right .rc p { /* Remove empty line above image wrapped in <p> */
	padding: 0;
	margin: 0;
}

/* Three-Column Layout */
.three-column .col, .three-column .rc {
	width: 32%;
	float: left;
}

/* Shrink Images To Fit In A Vertical Space */
.img-450h img {
	display: block;
	max-height: 450px !important;
	width: auto;
	margin: 0;
	padding: 0;
}
.img-300h img {
	display: block;
	max-height: 300px !important;
	width: auto;
	margin: 0;
	padding: 0;
}
.center img, .img-center img {
	display: block;
	margin-left: auto;
	margin-right: auto;
}


              
            
!

JS

              
                
              
            
!
999px

Console