HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
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.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
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.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
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.
Using packages here is powered by esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<div class="l-container">
<div class="l-nav u-clearfix">
<div class="l-nav__right">
<div class="c-nav-links">
<div class="c-nav-links__item">
<span class="c-nav-links__item--highlight">Tony BETA3 and v2</span>
</div>
<div class="c-nav-links__item">
Logged in as: <a class="c-nav-links__item--a" href="#">Tony Hill</a>
</div>
<div class="c-nav-links__item">
<a class="c-nav-links__item--a" href="#">Help</a>
</div>
<div class="c-nav-links__item">
<a class="c-nav-links__item--a" href="#">Sign Out</a>
</div>
</div>
</div>
<div class="l-nav__left">
<div class="c-tabbed-nav">
<div class="c-tabbed-nav__item c-tabbed-nav__item--icon">
<i class="material-icons">home</i>
</div>
<div class="c-tabbed-nav__item c-tabbed-nav__item--active">
Documents
</div>
<div class="c-tabbed-nav__item">
Transcripts
</div>
<div class="c-tabbed-nav__item">
Chronology
</div>
<div class="c-tabbed-nav__item">
Notes
</div>
<div class="c-tabbed-nav__item">
Search
</div>
<div class="c-tabbed-nav__item">
Admin
</div>
</div>
</div>
</div>
<div class="l-page">
<div class="l-toolbar">
</div>
<div class="l-main l-main--has-sidebar">
<div class="l-main__primary">
<div class="l-main-content l-main-content--full-height Grid">
<div class="c-panel">
<div class="c-panel__heading">
<div class="c-breadcrumbs">
<div class="c-breadcrumbs__item">Documents</div>
<div class="c-breadcrumbs__item">Legal Research</div>
<div class="c-breadcrumbs__item">California Codes</div>
</div>
</div>
<div class="c-panel__body">
<div class="l-scroll-section js-sticky-head">
<table class="c-table">
<thead>
<tr>
<th class="c-table__header c-table__header-cell--icon"></th>
<th class="c-table__header c-table__header-cell--40">Name</th>
<th class="c-table__header">Date</th>
<th class="c-table__header">Tags</th>
<th class="c-table__header">Description</th>
</tr>
</thead>
<tbody>
<tr class="c-table__folder-row">
<td class="c-table__folder-cell c-table__folder-cell--icon"><i class="material-icons">folder</i></td>
<td class="c-table__folder-cell">Lorem ipsum dolor sit amet</td>
<td class="c-table__folder-cell">06/23/2016</td>
<td class="c-table__folder-cell"></td>
<td class="c-table__folder-cell"></td>
</tr>
<tr class="c-table__folder-row">
<td class="c-table__folder-cell c-table__folder-cell--icon"><i class="material-icons">folder</i></td>
<td class="c-table__folder-cell">Lorem ipsum dolor sit amet</td>
<td class="c-table__folder-cell">06/23/2016</td>
<td class="c-table__folder-cell"></td>
<td class="c-table__folder-cell"></td>
</tr>
<tr class="c-table__folder-row">
<td class="c-table__folder-cell c-table__folder-cell--icon"><i class="material-icons">folder</i></td>
<td class="c-table__folder-cell">Lorem ipsum dolor sit amet</td>
<td class="c-table__folder-cell">06/23/2016</td>
<td class="c-table__folder-cell"></td>
<td class="c-table__folder-cell"></td>
</tr>
<tr class="c-table__folder-row">
<td class="c-table__folder-cell c-table__folder-cell--icon"><i class="material-icons">folder</i></td>
<td class="c-table__folder-cell">Lorem ipsum dolor sit amet</td>
<td class="c-table__folder-cell">06/23/2016</td>
<td class="c-table__folder-cell"></td>
<td class="c-table__folder-cell"></td>
</tr>
<tr class="c-table__folder-row">
<td class="c-table__folder-cell c-table__folder-cell--icon"><i class="material-icons">folder</i></td>
<td class="c-table__folder-cell">Lorem ipsum dolor sit amet</td>
<td class="c-table__folder-cell">06/23/2016</td>
<td class="c-table__folder-cell"></td>
<td class="c-table__folder-cell"></td>
</tr>
<tr class="c-table__folder-row">
<td class="c-table__folder-cell c-table__folder-cell--icon"><i class="material-icons">folder</i></td>
<td class="c-table__folder-cell">Lorem ipsum dolor sit amet</td>
<td class="c-table__folder-cell">06/23/2016</td>
<td class="c-table__folder-cell"></td>
<td class="c-table__folder-cell"></td>
</tr>
<tr class="c-table__folder-row">
<td class="c-table__folder-cell c-table__folder-cell--icon"><i class="material-icons">folder</i></td>
<td class="c-table__folder-cell">Lorem ipsum dolor sit amet</td>
<td class="c-table__folder-cell">06/23/2016</td>
<td class="c-table__folder-cell"></td>
<td class="c-table__folder-cell"></td>
</tr>
<tr class="c-table__doc-row">
<td class="c-table__doc-cell c-table__doc-cell--icon"><i class="material-icons">book</i></td>
<td class="c-table__doc-cell">0001 CA Civ CodeLinks</td>
<td class="c-table__doc-cell">06/23/2016</td>
<td class="c-table__doc-cell"></td>
<td class="c-table__doc-cell"></td>
</tr>
<tr class="c-table__doc-row">
<td class="c-table__doc-cell c-table__doc-cell--icon"><i class="material-icons">book</i></td>
<td class="c-table__doc-cell">0002 CA Code of Civil Procedure</td>
<td class="c-table__doc-cell">06/23/2016</td>
<td class="c-table__doc-cell"></td>
<td class="c-table__doc-cell"></td>
</tr>
<tr class="c-table__doc-row">
<td class="c-table__doc-cell c-table__doc-cell--icon"><i class="material-icons">book</i></td>
<td class="c-table__doc-cell">0003 CC - Consideration</td>
<td class="c-table__doc-cell">06/23/2016</td>
<td class="c-table__doc-cell"></td>
<td class="c-table__doc-cell"></td>
</tr>
<tr class="c-table__doc-row">
<td class="c-table__doc-cell c-table__doc-cell--icon"><i class="material-icons">book</i></td>
<td class="c-table__doc-cell">0004 CCP - Principles of Evidence</td>
<td class="c-table__doc-cell">06/23/2016</td>
<td class="c-table__doc-cell"></td>
<td class="c-table__doc-cell"></td>
</tr>
<tr class="c-table__doc-row">
<td class="c-table__doc-cell c-table__doc-cell--icon"><i class="material-icons">book</i></td>
<td class="c-table__doc-cell">0005 Civil Code 3300</td>
<td class="c-table__doc-cell">06/23/2016</td>
<td class="c-table__doc-cell"></td>
<td class="c-table__doc-cell"></td>
</tr>
<tr class="c-table__doc-row">
<td class="c-table__doc-cell c-table__doc-cell--icon"><i class="material-icons">book</i></td>
<td class="c-table__doc-cell">0006 Commercial Code 2201 - 2210LinksN</td>
<td class="c-table__doc-cell">06/23/2016</td>
<td class="c-table__doc-cell"></td>
<td class="c-table__doc-cell"></td>
</tr>
<tr class="c-table__doc-row">
<td class="c-table__doc-cell c-table__doc-cell--icon"><i class="material-icons">book</i></td>
<td class="c-table__doc-cell">0007 Commercial Code 2301-2328</td>
<td class="c-table__doc-cell">06/23/2016</td>
<td class="c-table__doc-cell"></td>
<td class="c-table__doc-cell"></td>
</tr>
<tr class="c-table__doc-row">
<td class="c-table__doc-cell c-table__doc-cell--icon"><i class="material-icons">book</i></td>
<td class="c-table__doc-cell">0008 Commercial Code 2401 - 2403</td>
<td class="c-table__doc-cell">06/23/2016</td>
<td class="c-table__doc-cell"></td>
<td class="c-table__doc-cell"></td>
</tr>
<tr class="c-table__doc-row">
<td class="c-table__doc-cell c-table__doc-cell--icon"><i class="material-icons">book</i></td>
<td class="c-table__doc-cell">0009 Commercial Code 2501-2515</td>
<td class="c-table__doc-cell">06/23/2016</td>
<td class="c-table__doc-cell"></td>
<td class="c-table__doc-cell"></td>
</tr>
<tr class="c-table__doc-row">
<td class="c-table__doc-cell c-table__doc-cell--icon"><i class="material-icons">book</i></td>
<td class="c-table__doc-cell">0010 Commercial Code 2601 - 2616</td>
<td class="c-table__doc-cell">06/23/2016</td>
<td class="c-table__doc-cell"></td>
<td class="c-table__doc-cell"></td>
</tr>
<tr class="c-table__doc-row">
<td class="c-table__doc-cell c-table__doc-cell--icon"><i class="material-icons">book</i></td>
<td class="c-table__doc-cell">0011 Commercial Code 2701 - 2725</td>
<td class="c-table__doc-cell">06/23/2016</td>
<td class="c-table__doc-cell"></td>
<td class="c-table__doc-cell"></td>
</tr>
<tr class="c-table__doc-row">
<td class="c-table__doc-cell c-table__doc-cell--icon"><i class="material-icons">book</i></td>
<td class="c-table__doc-cell">0012 Commercial Code 1303</td>
<td class="c-table__doc-cell">06/23/2016</td>
<td class="c-table__doc-cell"></td>
<td class="c-table__doc-cell"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="c-panel__foot">
<div class="c-pagination">
<div class="c-pagination__rows">
<span class="c-pagination__text">Rows per page: 50</span><i class="material-icons">arrow_drop_down</i>
</div>
<div class="c-pagination__range">
<span class="c-pagination__text">1 - 50 of 567</span>
</div>
<div class="c-pagination__controls">
<div class="c-pagination__controls-button"><i class="material-icons">keyboard_arrow_left</i></div>
<div class="c-pagination__controls-button"><i class="material-icons">keyboard_arrow_right</i></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="l-main__layout-control">
<div class="c-button-background js-side-expander">
<i class="material-icons">chevron_left</i>
</div>
</div>
<div class="l-main__sidebar">
</div>
</div>
</div>
</div>
/**
* CONTENTS
*
* VARIABLES
* Base colors..........Seed colors that theme is generated from
* Generated colors.....Uses Sass color functions to generate variations
* Theme colors.........Catalogs all colors used for fine-tuning theme
* Gradients............Background gradients
* Breakpoints..........Mobile, Tablet, Laptop
* Font.................Sizes & Family
* Padding..............Range of padding-options
* Shadows..............Shadows
*
* GENERIC
* Box-sizing...........Better default `box-sizing`
* Font.................Default body font
* Image................Max width 100% for responsiveness
*
* LAYOUT
* Wrappers.............Wrapping and constraining elements.
*
* COMPONENTS
* Tabbed nav...........Tab Navigation on navbar
* Nav Links............Non-tabbed links on navbar
* Breadcrumbs..........
* Pagination...........
* Table................Basic Panel table
*
* UTILITIES
* Clearfix.............Clearfix.
* Text.................Text helpers.
*/
/*------------------------------------*\
#VARIABLES
\*------------------------------------*/
// ************************************ Base colors
$base-color: #1E8CA5; //forum foreground
$background-color: #1E8CA5; //forum background
$accent:#89e8d4; //forum accent
$base-color: #400; //magnum foreground
$background-color: #766; //magnum background
$accent:#7de; //magnum accent
// $base-color:#624ea6; //bailli foreground
// $background-color: #759; //bailli background
// $accent:#e98c26; //bailli accent
// $base-color: #007ec0; //DLA Piper foreground
// $background-color: #48a; //DLA Piper background
// $accent:#48a; //DLA Piper accent
// $base-color: #30afa5; //Clifford Chance foreground
// $background-color: #498; //Clifford Chance background
// $accent:#30afa5; //Clifford Chance accent
// $base-color: #799; //Allen and Overy foreground
// $background-color: #a0a4a5; //Allen and Overy background
// $accent:#a62f20; //Allen and Overy accent
// $base-color: #3F51B5; //neutral foreground
// $background-color: #3F51B5; //neutral background
// $accent:#ff4081; //neutral accent
// *********************************** Generated colors
$base-lighter-1: mix(white, $base-color, 10%);
$base-lighter-2: mix(white, $base-color, 20%);
$base-darker-1: mix(black, $base-color, 20%);
$base-darker-2: mix(black, $base-color, 30%);
$base-darker-3: mix(black, $base-color, 40%);
$base-darker-4: mix(black, $base-color, 50%);
$back-lighter-1: mix(white, $background-color, 25%);
$back-lighter-2: mix(white, $background-color, 40%);
$back-lighter-3: mix(white, $background-color, 62%);
$back-lighter-4: mix(white, $background-color, 75%);
$back-lighter-5: mix(white, $background-color, 85%);
$back-lighter-6: mix(white, $background-color, 95%);
$accent-dark:saturate(mix(black, $accent,55%),40%);//most likely to need adjusting when generating themes
$accent-mid-light:mix(white, $accent,70%);//most likely to need adjusting when generating themes
$accent-light:mix(white, $accent,85%);//most likely to need adjusting when generating themes
// *********************************** Theme colors
$red: #990000;
$grey: mix(#555, $base-color, 80%);
$grey-lighter-1:mix($back-lighter-6, $grey, 25%);
$grey-lighter-2:mix($back-lighter-6, $grey, 40%);
$grey-lighter-3:mix($back-lighter-6, $grey, 55%);
$grey-lighter-4:mix($back-lighter-6, $grey, 70%);
$grey-lighter-5:mix($back-lighter-6, $grey, 80%);
$grey-lighter-6:mix(white, $grey-lighter-5, 50%);
$transparent-white:rgba(255,255,255,0.2);
$text-on-dark:rgba(white, 0.8);
$text-on-light:$grey;
$container-back-lighter:$back-lighter-6;
$container-back-darker:$back-lighter-4;
$nav-back-lighter:$base-lighter-1;
$nav-back-darker:$base-darker-2;
$tabbed-nav-color: white;
$tabbed-nav-hover-back: rgba(white,0.8);
$tabbed-nav-hover-color: $base-color;
$tabbed-nav-active-back:white;
$tabbed-nav-active-color:$base-color;
$sidebar-back-darker:$back-lighter-4;
$sidebar-back-lighter:$back-lighter-5;
$button-color:$grey-lighter-1;
$button-hover-color: $base-darker-1;
$button-outline: $grey-lighter-4;
$button-hover-outline: $back-lighter-2;
$button-selected-back: $accent-mid-light;
$button-selected-color: $accent-dark;
$dialog-back-top: $base-darker-3;
$dialog-back-bottom: $back-lighter-1;
$dialog-close-back:$red;
$dialog-close-color:white;
$dialog-section-heading-color:white;
$dialog-line:$transparent-white;
$dialog-button-color:white;
$dialog-button-outline:$text-on-dark;
$dialog-button-primary-back:$base-darker-4;
$panel-back:white;
$panel-head-back:$back-lighter-6;
$panel-head-color:$base-darker-1;
$panel-head-border:$back-lighter-5;
$panel-section-heading-color: $base-color;
$panel-line:$grey-lighter-6;
$loader-message-color:$base-darker-1;
$loader-box-1:$base-color;
$loader-box-2:$back-lighter-4;
$loader-box-3:$accent;
$loader-box-4:$base-darker-1;
$expand-list-section-heading-color: $text-on-light;
$expand-list-item-back:white;
$expand-list-item-color:$text-on-light;
$breadcrumbs-color: $base-darker-1;
$table-header-color:$back-lighter-1;
// *********************************** Gradients
$container-back-gradient: radial-gradient(ellipse at center, $container-back-lighter 0%,$container-back-darker 100%);
$sidebar-back-gradient: radial-gradient(ellipse at center, $sidebar-back-lighter 0%,$sidebar-back-darker 100%);
$nav-back-gradient: linear-gradient(135deg, $nav-back-darker 0%, $nav-back-darker 48%, $nav-back-lighter 48%, $nav-back-darker 100%);
$nav-back-gradient-tab: linear-gradient(135deg, $nav-back-darker 0%, $nav-back-darker 75%, $nav-back-lighter 75%, $nav-back-darker 100%);
$nav-back-gradient-mob: linear-gradient(135deg, $nav-back-darker 0%, $nav-back-lighter 100%);
$dialog-back-gradient:linear-gradient(to bottom, $dialog-back-top 0%, $dialog-back-bottom 100%);
// *********************************** Breakpoints
$mob-break:480px;
$tab-break:920px;
$lap-break:1120px;
// *********************************** Font
$font-family:Lato,Sans-serif;
$main-font-size: 13px;
$large-font-size: 15px;
$h2-size: 18px;
// *********************************** Border Radius
$brdr: 3px;
$brdr-rounder: 5px;
// *********************************** Padding
$pad:16px;
$pad-1-4: $pad/4;
$pad-1-2: $pad/2;
$pad-3-4: $pad-1-4 + $pad-1-2;
$pad-large: $pad + $pad-1-2;
$pad-2: $pad*2;
$pad-3: $pad*3;
// *********************************** Shadows
$boxshad: 0 3px 4px rgba(0, 0, 0, 0.2);
$boxshad-dialog: 0 30px 70px rgba(0, 0, 0, 0.5);
$boxshad-tabs: inset 0px -3px 6px -3px rgba(0, 0, 0, 0.3);
$boxshad-raised:0 3px 3px rgba(0,0,0,.16),0 6px 12px rgba(0,0,0,.32);
$boxshad-page-inset: inset 0 3px 4px rgba(0, 0, 0, 0.1);
$boxshad-expand-list:0 -1px 0 #e5e5e5,0 0 2px rgba(0,0,0,.12),0 2px 4px rgba(0,0,0,.24);
/*------------------------------------*\
#GENERIC
\*------------------------------------*/
/* box-sizing */
html {
box-sizing: border-box;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
/* font */
body {
font-size: $main-font-size;
font-family: Lato,Sans-serif;
}
/*------------------------------------*\
#BASE
\*------------------------------------*/
/*------------------------------------*\
#LAYOUT
\*------------------------------------*/
/* Wrappers */
.l-container {
height: 100vh;
display:flex;
flex-direction: column;
background: $container-back-gradient;
}
.l-nav {
background: $nav-back-gradient;
flex-shrink:0;
@media (max-width: $tab-break) {
background: $nav-back-gradient-tab;
}
@media (max-width: $mob-break) {
background: $nav-back-gradient-mob;
}
}
.l-nav__right {
float:right;
@media (max-width: $tab-break) {
float:none;
}
}
.l-nav__left {
float:left;
}
.l-page {
flex-grow:1;
display:flex;
flex-direction: column;
}
.l-toolbar {
background:white;
height:40px;//stopgap
flex-shrink:0;
}
.l-main {
flex-grow:1;
overflow-y: auto;
overflow-x: hidden;
// padding: $pad-1-2;
position:relative;
display:flex;
flex-direction: column;
&:before {
content:" ";
position:fixed;
z-index:1000;
height:6px;
width:100%;
box-shadow: $boxshad-page-inset;
}
&.l-main--has-sidebar {
flex-direction:row;
}
&.l-main--side-expand{
.l-main__primary{
width:40%;
}
}
&.l-main--side-expand{
.l-main__sidebar{
width:60%;
}
}
}
.l-main__primary {
width:70%;
display:flex;
flex-direction: column;
transition: width .4s ease;
}
.l-main__layout-control {
width:40px;
display:flex;
flex-shrink:0;
flex-direction: column;
cursor:col-resize;
padding:$pad-large 0;
}
.l-main__sidebar {
width:30%;
background:$sidebar-back-gradient;
flex-shrink:0;
display:flex;
flex-direction: column;
border-left:1px solid $back-lighter-3;
transition: width .4s ease;
}
.l-main-content {
padding:$pad;
}
.l-main-content--full-height {
flex-grow:1;
}
.l-scroll-section {
overflow-y:auto;
}
/*------------------------------------*\
#COMPONENTS
\*------------------------------------*/
/* tabbed nav */
.c-tabbed-nav {
display:flex;
}
.c-tabbed-nav__item {
color:$tabbed-nav-color;
padding:$pad-1-2 $pad-1-2 $pad-1-2 $pad-1-2;
text-transform:uppercase;
font-size:$main-font-size;
border-radius: $brdr $brdr 0 0;
transition: background-color .15s linear;
cursor:pointer;
&:hover {
color: $tabbed-nav-hover-color;
background: $tabbed-nav-hover-back;
box-shadow:$boxshad-tabs;
}
&.c-tabbed-nav__item--active {
background:$tabbed-nav-active-back;
color:$tabbed-nav-active-color;
box-shadow:none;
cursor:default;
}
&.c-tabbed-nav__item--icon {
padding:$pad-1-4 $pad-1-4 0 $pad-1-4;
i {
padding:0;
margin:0;
font-size: 20px;
}
}
}
/*nav-links*/
.c-nav-links{
display:flex;
}
.c-nav-links__item {
color:$text-on-dark;
padding:$pad-1-2 $pad-1-2 $pad-1-2 $pad-1-2;
}
.c-nav-links__item--highlight {
color:white;
}
.c-nav-links__item--a {
color:white;
text-decoration:none;
&:hover {
text-decoration:underline;
}
}
/* panel */
.c-panel {
background: $panel-back;
border-radius: $brdr;
box-shadow: $boxshad;
display:flex;
flex-direction: column;
width:100%;
}
.c-panel__heading {
text-align:left;
border-radius: $brdr $brdr 0 0;
background: $panel-head-back;
border-bottom: 1px solid $panel-head-border;
flex-shrink:0;
}
.c-panel__foot {
text-align:right;
border-radius: 0 0 $brdr $brdr;
background: $panel-head-back;
border-top: 1px solid $panel-head-border;
flex-shrink:0;
color: $panel-head-color;
}
.c-panel__body {
flex-grow:1;
display:flex;
flex-direction: column;
}
h2.c-panel__heading-text, .c-panel__heading-text{
padding: $pad-3-4 0 $pad-1-2 $pad;
margin: 0px;
text-transform: uppercase;
font-weight: normal;
color: $panel-head-color;
font-size: $h2-size;
}
.c-panel__section-heading {
margin: 0px;
padding: 0 0 $pad-1-2 0;
font-size:$large-font-size;
color: $panel-section-heading-color;
font-weight:normal;
}
.c-panel__section{
padding: $pad-3-4 $pad;
}
.c-panel__text {
margin:0;
padding: 0 0 1em 0;
color: $text-on-light;
font-size: $main-font-size;
}
/* breadcrumbs */
.c-breadcrumbs {
display:flex;
flex-wrap: wrap;
}
.c-breadcrumbs__item {
color: $breadcrumbs-color;
padding: $pad-1-2;
position:relative;
margin: $pad-1-2;
border-radius: $brdr;
font-weight: normal;
font-size: $large-font-size;
cursor:pointer;
border: 1px solid transparent;
transition: all .15s linear;
&:hover{
border: 1px solid $back-lighter-3;
box-shadow: $boxshad;
}
&:after {
content: ">";
position:absolute;
right:-14px;
}
&:last-of-type {
font-weight:bold;
&:after {
content: " ";
}
}
}
/* pagination */
.c-pagination {
display:flex;
justify-content: flex-end;
align-items:center;
}
.c-pagination__text {
font-size:$large-font-size;
}
.c-pagination__rows {
display:flex;
align-items:center;
padding:$pad;
}
.c-pagination__range{
display:flex;
align-items:center;
padding:$pad $pad-large;
}
.c-pagination__controls{
display:flex;
align-items:center;
padding:$pad-1-2;
}
.c-pagination__controls-button {
padding:$pad-1-4;
margin-left:$pad-1-4;
border: 1px solid transparent;
transition: all .15s linear;
border-radius:$brdr;
font-size:0;
i {
font-size:30px;
}
&:hover{
border: 1px solid $button-outline;
box-shadow: $boxshad;
}
}
/* table */
.c-table {
width:100%;
border-collapse: collapse;
table-layout: fixed;
}
.c-table__header {
text-align:left;
padding:$pad $pad $pad-1-2 $pad;
color:$table-header-color;
font-weight:normal;
border-bottom: 1px solid $panel-line;
}
.c-table__header-cell--icon {
width:40px;
}
.c-table__header-cell--40{
width:40%;
}
.c-table__folder-row:hover td, .c-table__doc-row:hover td{
background: $accent-light;
}
.c-table__folder-cell {
padding:$pad-1-2 $pad;
border-bottom: 1px solid $panel-line;
cursor:pointer;
i {
color:$back-lighter-2;
}
}
.c-table__doc-cell {
padding:$pad-1-2 $pad;
cursor:pointer;
border-bottom: 1px solid $panel-line;
&.c-table__doc-cell--icon {
width:40px;
padding-right:0;
}
i {
color:$accent;
}
}
.c-button-background {
font-size:0;
border-radius:50%;
background:$back-lighter-3;
color:white;
transition:transform 0.5s linear;
margin:$pad-1-2;
&.c-button-background--side-expand {
transform: rotate(540deg);
}
&:hover {
background: $base-color;
box-shadow:$boxshad;
}
}
/*------------------------------------*\
#UTILITIES
\*------------------------------------*/
/* clearfix */
.u-clearfix:after {
content:" ";
display:block;
clear:both;
}
/* text-helpers */
.u-align-left {
text-align:left;
}
.u-align-center {
text-align:center;
}
.u-align-right {
text-align:right;
}
/* flex box helpers */
.u-grow {
flex-grow:1;
}
.u-no-shrink {
flex-grow:1;
}
/* basic width stuff - probably not going to survive when proper grid system in place */
.u-width-1-4 {
width:25%;
}
.u-width-1-3 {
width:33%;
}
.u-width-1-2 {
width:50%;
}
.u-width-2-3 {
width:66%;
}
.u-width-3-4 {
width:75%;
}
//sticky heading
function stickyResize(){
tablewidth = table.width();
tableOffset = wrapper.offset().top;
$('.header-fixed').css({
'width':tablewidth,
'top':tableOffset + 'px'
});
table.find('th').each(function(index, value){
$header.find('th').eq(index).css('width',$(this).outerWidth() + 'px');
console.log($(this).width()+'px');
});
};
var table = $(".js-sticky-head > .c-table");
var wrapper = $(".js-sticky-head");
var fixedheader = $('<div class="header-fixed"></div>');
var tableOffset = wrapper.offset().top;
var tableleft = wrapper.offset().left;
var tablewidth = table.width();
var $header = $("thead", table).clone();
var newTable = $('<table class="'+table.attr('class')+'"></table>');
$('js-sticky-head').css('position','relative');
$header.appendTo(newTable);
newTable.css('margin','0');
fixedheader.css({
'position':'fixed',
'top':tableOffset + 'px',
'background': 'white',
'display':'none',
'left':tableleft + 'px',
'width':tablewidth + 'px',
'z-index': '1000'
});
var $fixedHeader = fixedheader.append(newTable);
table.find('th').each(function(index, value){
// console.log($(this).width()+'px');
$header.find('th').eq(index).css('width',$(this).outerWidth()+'px');
});
fixedheader.appendTo('.js-sticky-head');
$fixedHeader.show();
table.addClass('stuck');
$(window).on("resize", function() {
stickyResize();
});
// side expand
$(".js-side-expander").click(function(){
$(".l-main").toggleClass("l-main--side-expand");
$(this).toggleClass("c-button-background--side-expand");
$(".header-fixed").fadeOut(350);
setTimeout(function(){
stickyResize();
$(".header-fixed").fadeIn(150);
}, 500);
});
//tabbed-nav
$(".c-tabbed-nav__item").click(function(){
$(".c-tabbed-nav__item").removeClass("c-tabbed-nav__item--active");
$(this).addClass("c-tabbed-nav__item--active");
});
Also see: Tab Triggers