Created
March 30, 2016 08:48
-
-
Save mandymozart/3904d7ec993086b218b57df379902017 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dom-module id="mixin-grid"> | |
<template> | |
<style is="custom-style"> | |
:root { | |
/* Basics */ | |
--grid: { | |
display: flex; | |
flex-wrap: wrap; | |
list-style: none; | |
margin: 0; | |
padding: 0; | |
}; | |
--grid-cell: { | |
flex: 1; | |
}; | |
--grid-flex-cell: { | |
display: flex; | |
}; | |
/* Positioning */ | |
--grid--top: { | |
align-items: flex-start; | |
}; | |
--grid--bottom: { | |
align-items: flex-end; | |
}; | |
--grid--center: { | |
align-items: center; | |
}; | |
--grid--justify-center: { | |
justify-content: center; | |
}; | |
--grid-cell--top: { | |
align-self: flex-start; | |
}; | |
--grid-cell--bottom: { | |
align-self: flex-end; | |
}; | |
--grid-cell--center: { | |
align-self: center; | |
}; | |
/* Sizing */ | |
--grid-cell--auto-size: { | |
flex: none; | |
}; | |
--grid--fit-grid-cell: { | |
flex: 1; | |
}; | |
--grid--full-grid-cell: { | |
flex: 0 0 100%; | |
}; | |
--grid--1of2-grid-cell: { | |
flex: 0 0 50%; | |
}; | |
--grid--1of3-grid-cell: { | |
flex: 0 0 33.3333%; | |
}; | |
--grid--1of4-grid-cell: { | |
flex: 0 0 25%; | |
}; | |
/* Gutters */ | |
--grid--gutters: { | |
margin: -var(--grid-pad) 0 var(--grid-pad) -var(--grid-pad); | |
}; | |
--grid--gutters-grid-cell: { | |
padding: var(--grid-pad) 0 0 var(--grid-pad); | |
}; | |
} | |
</style> | |
</template> | |
</dom-module> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment