Pen Settings

HTML

CSS

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.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

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>
  <p><strong>Tokens Spreadsheet:</strong> <a href="https://docs.google.com/spreadsheets/d/1Eu2US-qC8JAFjRc3c7k0mCTe9TTfuxUMpWguj0cZG-0/edit#gid=209237198" target="_blank"> View spreadsheet</a></p>
<h2>[Etta] Border / Radius (Shape) + Containers (Examples & Experiments)</h2>
  <p><div class="caption">Border Color</div> 
  Generic `HR`/divider (used to seperate ugc content ; component list):
  <hr style="margin-bottom:16px;">
  <div class="et-bg-layout" style="color:white; padding-bottom:4px; margin-bottom:12px;">Inverse divider:
    <hr class="inverse" ></div>
  <div class="et-border" style="margin-bottom:16px;">Container Border Color</div>
  <div class="et-bg-layout" style="height:2em; padding-top:8px; margin-bottom:16px;">
    <div class="et-border-white" style="color:white;">Button Border Inverse</div>
  </div>
  <div class="et-border-black-sixty" style="margin-bottom:16px;">Button/Control Border</div>
  <div class="et-border-black-ninety" style="margin-bottom:16px;">Control Border (Focused)</div>
  <div class="et-border-disabled" style="margin-bottom:16px;">Pill Outline</div>
  <p><div class="caption">Radius Rounding</div> 

  <div class="et-layout" style="width: 320px; height: 320px; display: inline-flex; padding-top:16px; padding-left:16px; margin-right:16px;">
No rounding <br>
No Min/Max Size<br>
(Layout & Grid)</div>
  <div class="et-brick et-border" style="display: inline-flex; margin-right:16px; width: 48px;">
4dp 
>48x48
(Controls)
</div>
  <div class="et-block et-border-radius-medium et-border" style="display: inline-flex; margin-right:16px;">
8dp rounding <br>
<48x48 <br>
(Cards)
</div>

</p>

<hr>

<p><div class="caption">Container Corners</div> 
<ul>
  <div class="et-layout" style="display: inline-flex; margin-right:16px; margin-bottom:16px; width:320px; height: 240px;">
        <div class="et-fg-layout" style="height:100%; width:280px; border-right: 1px solid rgba(0, 0, 0, .12);">No rounding (Layout & Grid) </div>
      </div>
  <div class="et-container-attached-top" style="display: inline-flex; height:240px; width:320px; margin-right:16px;">2 corner rounding (Attached)</div>
  <div class="et-container-attributed-topleft" style="height:240px; width:320px; margin-right:16px;">3 corner rounding (Attributed)</div>
  <div class="et-container-lined" style="height:240px; width:320px; display: inline-flex;">4 corner rounding (Free)</div>
</ul>
</p>

<hr>

<p><div class="caption">Container Styles</div> 

  <div class="et-container-lined" style="width: 320px; height: 240px; margin-right:16px; display: inline-flex;">Lined</div>
  <div class="et-container-filled100" style="width: 320px; height: 240px; margin-right:16px; display: inline-flex;">Filled 100</div>
  <div class="et-container-filled200" style="width: 320px; height: 240px; margin-right:16px; display: inline-flex;">Filled 200</div>
<div class="et-container-inverse" style="width: 320px; height: 240px; margin-right:16px; display: inline-flex; color: white;">Inverse</div>
  <div class="et-container-elevated" style="width: 320px; height: 240px; margin-right:16px; display: inline-flex;">Elevated</div>

</p>

    <hr>

<p><div class="caption">Container Variations (Attached & Attributed)</div> 
<div class="et-container-attached-top" style="width:320px; height:240px; margin-right:16px; margin-bottom:16px;">attached top</div>
<div class="et-container-attached-bottom" style="width:320px; height:240px; margin-right:16px; margin-bottom:16px;">attached bottom</div>
<div class="et-container-attached-left" style="width:320px; height:240px; margin-right:16px; margin-bottom:16px;">attached left</div>
<div class="et-container-attached-right" style="width:320px; height:240px; margin-right:16px; margin-bottom:16px;">attached right</div>
<br>
<div class="et-container-attributed-topleft" style="width:320px; height:240px; margin-right:16px; margin-bottom:16px;">attributed topleft</div>
<div class="et-container-attributed-topright" style="width:320px; height:240px; margin-right:16px; margin-bottom:16px;">attributed topright</div>
<div class="et-container-attributed-bottomleft" style="width:320px; height:240px; margin-right:16px; margin-bottom:16px;">attributed bottomleft</div>
<div class="et-container-attributed-bottomright" style="width:320px; height:240px; margin-right:16px; margin-bottom:16px;">attributed bottomright</div>
<br>
<hr>

<p><div class="caption">Examples (Cards, Messaging, Panel)</div> 

  <div class="panel et-container-attached-right">Example 3 (Hub; FG Canvas/Panel)</div>
  <div class="messaging et-container-attached-bottom">Example 2 (Messaging; Container Rounded Attached Bottom)</div>
  <div class="card et-container-lined" style="margin-right:16px;">Example 1 (Entity Cards; Container Rounded)</div>
  <div class="card et-container-lined" style="margin-right:16px;">Example 1 (Entity Cards; Container Rounded)</div>
  <div class="card et-container-lined" style="margin-right:16px;">Example 1 (Entity Cards; Container Rounded)</div>

</p>

<hr style="width:80%; display:inline-flex;">

<p><div class="caption">Experiments</div> 
<ul>
  <li> <h4>Experiment 1 (How does rounding work; %, Em, or..) - TBD</h4>
    <div style="display: inline-flex;"><div style="width:100px; height:100px; background-color:pink; border-radius: none;">% Round No</div>
    <div style="width:100px; height:100px; background-color:green; border-radius: 25%;">% Roundish</div>
    <div style="width:100px; height:100px; background-color:blue; border-radius: 100%;">% Rounding "Full"</div>
    <br>
    </div>
    <div style="display: inline-flex;">
    <div style="width:100px; height:100px; background-color:pink; border-radius: 0em">Em Round No</div>
    <div style="width:100px; height:100px; background-color:green; border-radius: 1em">Em Roundish</div>
    <div style="width:100px; height:100px; background-color:blue; border-radius: 3em">Em Rounding "Full"</div>
    </div>
  <li> <h4>Experiment 2 (Box shadows)</h4>
    <span> <div class="et-brick et-border"> Normal Border </div></span> <span> <div class="et-brick et-box-shadow-thin">Box Shadow Thin @ .12</span> <!--this doesn't look right? -->
    <li> <h4>Experiment 3 (Circle entities/etc.)</h4>
      <div class="circle-image" style="width:128px; height:128px;"><small>128</small></div>
      <div class="circle-image" style="width:64px; height:64px;"><small>64</small></div>
      <div class="circle-image" style="width:48px; height:48px;"><small>48</small></div>
      <div class="circle-image" style="width:32px; height:32px;"><small>32</small></div>
      <div class="circle-image" style="width:24px; height:24px;"><small>24</small></div>
      <li> <h4>Experiment 4 (Pills vs Buttons; same rounding?)</h4>
        <div class="pill">pill with fixed radius</div> 
        <div class="pill-em">pill with em radius</div>
        <div class="button">48 button with fixed radius</div>
        <div class="button-em">button with em radius</div>
        <div class="button-circle"><div class="button-circle-icon" style="width:24px; height: 24px; background-color:transparent; text-align: center;">%</div></div>
        <br>
        <div class="button">Really long text inside a hard valued button isn't always the best idea considering our new em model. Really long text inside a hard valued button isn't always the best idea considering our new em model.</div>
        <div class="button-em">Really long text inside a em value isn't that bad really and we should look at converting these also. Really long text inside a em value isn't that bad really and we should look at converting these also.</div>
        
</ul>
</p>

</body>
              
            
!

CSS

              
                :root {
  /*color*/
  --blue-seventy: #0A66C2;
  --coolgray-thirty: #DCE6F1;
  --transparent: rgba(255,255,255,.0);
  --coolgray-eighty: #38434F;
  --warmgray-ten: #FAFAF9;
  --warmgray-twenty: #F3F2EF;
  --white: rgba(255,255,255);
  /*border*/
  --border-none: 0px solid rgba(0, 0, 0, .0);
  --border-sixty: 1px solid rgba(0, 0, 0, .60);
  --border-black-ten: 1px solid rgba(0, 0, 0, .10);
  --border-black-fifteen: 1px solid rgba(0, 0, 0, .15);
  --border-black-sixty: 1px solid rgba(0, 0, 0, .60);
  --border-black-ninety: 1px solid rgba(0, 0, 0, .90); 
  --border-white-hundred: 1px solid rgba(255, 255, 255, 1);
  --border-none: 0px;
  --border-thin: 1px;
  --border-thicc: 2px;
  /*radius*/
  --radius-none: 0px;
  --radius-small: 4px;
  --radius-medium: 8px;
  --radius-large: 16px;
  --radius-xlarge: 24px;
  --border-radius-em-small: 1em; /*16px target size*/
  --border-radius-em-medium: 2em; /*32px target size*/
  --border-radius-em-large: 3em; /*48px target size*/
  /*spacing*/
  
  /*elevation*/
  --shadow: 0px 0px 0px 1px rgba(0,0,0,0.06), 0px 6px 6px 0px rgba(0,0,0,0.12); /*stacked shadows*/
  --shadow-box-none: 0px 0px 0px 0px rgba(0,0,0,0);
  --shadow-box-thin: 0px 0px 1px 0px rgba(0,0,0,0.12);
  /*circle*/
  --border-radius-circle-percent: 100%; 
 
}
/* Returns the value in rem for a given pixel value.
/// @param {Number} $value - The pixel value to be converted.
/ @return {Number} The converted value in rem. */

@function ad-rem($value) {
  $unit: unit($value);

  @if $value == 0 {
    @return 0;
  } @else if $unit == 'rem' {
    @return $value;
  } @else if $unit == 'px' {
    @return ($value / $ad-theme-base-font-size) * 1rem;
  } @else {
    @error 'Value must be in px, or rem.';
  }
}

body {
  font-family: -apple-system, system-ui, BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
  padding: 0px;
  margin: 0px;
  background-color: var(--white);
  /*background-color: var(--coolgray-eighty);*/
  height: 100%;
  margin: 16px;
  text-align: left;
  text-size: 16px;
}
ul {
  list-style-type: none;
}
small {
  font-size:10px;
  color:red;
}
hr {
  border-top: var(--border-black-ten);
  border-left: none;
  border-right: none;
  border-bottom: none;
}
hr.inverse {
  border-top: var(--border-white-hundred);
}
.caption {
  margin: 2rem 0;
  margin-bottom: 1em;
  padding: .5rem .75rem;
  border-radius: .25rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-whisper);
  background-color: #F2F2F2;
  border-radius: .25rem;
}
/*  Border Color */
.et-border {
  border: var(--border-black-ten);
  -webkit-background-clip: padding-box; 
  background-clip: padding-box; 
}
.et-border-white {
  border: var(--border-white-hundred);
  -webkit-background-clip: padding-box; 
  background-clip: padding-box; 
}
.et-border-black-sixty {
  border: var(--border-black-sixty);
  -webkit-background-clip: padding-box; 
  background-clip: padding-box; 
}
.et-border-black-ninety {
  border: var(--border-black-ninety);
  -webkit-background-clip: padding-box; 
  background-clip: padding-box; 
}
.et-border-disabled {
  border: var(--border-black-fifteen);
  -webkit-background-clip: padding-box; 
  background-clip: padding-box; 
}
/*  Border Weight */
.et-border-weight-none{
  border-width: 0px; /* not sure if these classes should still exist outside tokens */
}
.et-border-weight-thin{
  border-width: 1px;
}
.et-border-weight-thick{
  border-width: 2px;
}
/*  Box Shadow  - used in experiments only currently*/
.et-box-shadow-none{
  -webkit-box-shadow: 0px 0px 0px 0px rgba(0,0,0,0);
  -moz-box-shadow: 0px 0px 0px 0px rgba(0,0,0,0);
  box-shadow: var(--shadow-box-none);
}
.et-box-shadow-thin{
  -webkit-box-shadow: 0px 0px 1px 0px rgba(0,0,0,0.50); /*changed from .12, need to look at similar mapping of opacity*/
  -moz-box-shadow: 0px 0px 1px 0px rgba(0,0,0,0.50);
  box-shadow: var(--shadow-box-thin);
}
/*  "Shape"*/
.et-brick {
  background-color: var(--transparent); /*  would be color token */
  max-width:48px;
  max-height:48px;/*really auto content */
  padding: 8px;
  border-radius: var(--radius-small);
}
.et-block {
  background-color: var(--transparent); /*  would be color token */
  width: 160px;
  height: 160px; 
  padding: 16px;
  border-radius: var(--radius-medium);
}
/*  Container Types */
.et-bg-layout {
  background-color: var(--coolgray-eighty); /*  would be color token */
  width: auto;
  height: auto;
}
.et-layout {
  background-color: var(--warmgray-twenty); /*  would be color token */
  width: auto;
  height: auto;
}
.et-fg-layout {
  background-color: var(--white); /*  would be color token */
  width: auto;
  height: auto;
}
.et-container-lined {
  background-color: var(--white);
  border-radius: var(--radius-medium);
  border-width: var(--border-thin);
  border: var(--border-black-ten);
}
.et-container-filled100 {
  background-color: var(--warmgray-ten);
}
.et-container-filled200 {
  background-color: var(--warmgray-twenty);
}
.et-container-inverse {
  background-color: var(--coolgray-eighty);
}
.et-container-elevated {
  background-color: var(--white);
  box-shadow: var(--shadow);
}
.et-container-attached-top {
  background-color: var(--white); /*  would be color token */
  width: auto;
  height: auto;
  border-radius: 0px 0px 8px 8px;
  border-weight: var(--border-thin);
  display: inline-flex;
  border: var(--border-black-ten);
  box-shadow: var(--shadow);
}
.et-container-attached-bottom {
  background-color: var(--white); /*  would be color token */
  width: auto;
  height: auto;
  border-radius: 8px 8px 0px 0px;
  border-weight: var(--border-thin);
  display: inline-flex;
  border: var(--border-twelve);
  box-shadow: var(--shadow);
}
.et-container-attached-right {
  background-color: var(--white); /*  would be color token */
  width: auto;
  height: auto;
  border-radius: 8px 0px 0px 8px;
  border-weight: var(--border-thin);
  display: inline-flex;
  border: var(--border-twelve);
  box-shadow: var(--shadow);
}
.et-container-attached-left {
  background-color: var(--white); /*  would be color token */
  width: auto;
  height: auto;
  border-radius: 0px 8px 8px 0px;
  border-weight: var(--border-thin);
  display: inline-flex;
  border: var(--border-black-ten);
  box-shadow: var(--shadow);
}
.et-container-attributed-topleft {
  background-color: var(--white); /*  would be color token */
  width: auto;
  height: auto;
  border-radius: 0px 8px 8px 8px; /*top/left-right, bottom/left-right   */
  border-weight: var(--border-thin);
  display: inline-flex;
  border: var(--border-black-ten);
  box-shadow: var(--shadow);
}
.et-container-attributed-topright {
  background-color: var(--white); /*  would be color token */
  width: auto;
  height: auto;
  border-radius: 8px 0px 8px 8px; /*top/left-right, bottom/left-right   */
  border-weight: var(--border-thin);
  display: inline-flex;
  border: var(--border-black-ten);
  box-shadow: var(--shadow);
}
.et-container-attributed-bottomleft {
  background-color: var(--white); /*  would be color token */
  width: auto;
  height: auto;
  border-radius: 8px 8px 8px 0px; /*top/left-right, bottom/left-right   */
  border-weight: var(--border-thin);
  display: inline-flex;
  border: var(--border-black-ten);
  box-shadow: var(--shadow);
}
.et-container-attributed-bottomright {
  background-color: var(--white); /*  would be color token */
  width: auto;
  height: auto;
  border-radius: 8px 8px 0px 8px; /*top/left-right, bottom/left-right   */
  border-weight: var(--border-thin);
  display: inline-flex;
  border: var(--border-black-ten);
  box-shadow: var(--shadow);
}

/*  Examples */
.panel {
  width: 268px;
  height: 100%;
  right: 0;
  position: absolute;
  right: 0px;
}
.messaging {
  position: fixed;
  right: 160px;
  bottom: 0;
  width: 264px;
  height: 48px;
  background-color: #fff;
}
.card {
  background-color: var(--white);
  display: inline-flex;
  width: 180px;
  height:240px;
  padding: 16px;
}
/*  Experiments */
.circle-image {
  width: auto;
  height: auto;
  background-color: var(--warmgray-twenty);
  border-radius: var(--border-radius-circle-percent);
  background-image:url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/1134406/5.jpg);
  background-size: cover;
}
.pill {
  display: inline-block;
  border-radius: var(--radius-xlarge);
  background-color: var(--coolgray-thirty);
  text-align: center;
  overflow-wrap: break-word;
  vertical-align: middle;
  padding-top: 7px;
  padding-bottom: 7px;
  padding-left: 16px;
  padding-right: 16px;
}
.pill-em {
  display: inline-block;
  border-radius: var(--border-radius-em-medium);
  background-color: var(--coolgray-thirty);
  text-align: center;
  overflow-wrap: break-word;
  vertical-align: middle;
  padding-top: 7px;
  padding-bottom: 7px;
  padding-left: 16px;
  padding-right: 16px;
}
.button {
  display: inline-block;
  max-width: 320px;
  border-radius: var(--radius-xlarge);
  background-color: var(--blue-seventy);
  color: var(--white);
  min-width: 32px;
  max-width: 600px;
  max-height: 64px;
  padding-top: 14px;
  padding-left: 24px;
  padding-right: 24px;
  padding-bottom: 14px;
  overflow-wrap: break-word;
  vertical-align: middle;
}
.button-em {
  display: inline-block;
  border-radius: var(--border-radius-em-large);
  background-color: var(--blue-seventy);
  color: var(--white);
  min-width: 32px;
  max-width: 600px;
  max-height: 64px;
  padding-top: 14px;
  padding-left: 24px;
  padding-right: 24px;
  padding-bottom: 14px;
  overflow-wrap: break-word;
  vertical-align: middle;
}
.button-circle {
  display: inline-block;
  border-radius: var(--radius-xlarge);
  background-color: var(--blue-seventy);
  color: var(--white);
  max-width: 600px;
  max-height: 64px;
  padding-top: 12px;
  padding-left: 12px;
  padding-right: 12px;
  padding-bottom: 12px;
  overflow-wrap: break-word;
  vertical-align: middle;
}
              
            
!

JS

              
                
              
            
!
999px

Console