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 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

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

              
                <script type="module" src="https://unpkg.com/@umich-lib/components@v1/dist/umich-lib/umich-lib.esm.js"></script>
<script nomodule src="https://unpkg.com/@umich-lib/components@v1/dist/umich-lib/umich-lib.js"></script>

<body>
 <style>
  /* Add this to umich-lib.css? */
  * {
   -moz-osx-font-smoothing: grayscale;
  }

  .container {
   max-width: 1280px;
   margin: 0 auto;
   padding: 0 var(--space-xx-large);
  }

  /* For the primary page title heading, eg h1 */
  .heading-title {
   font-family: var(--font-second-family);
   font-size: var(--text-xxx-large);
   line-height: var(--line-height-page-heading);
   margin-bottom: var(--space-large);
  }

  /* What if the default h2 is just called heading? */
  .heading {
   font-size: var(--text-large);
   font-weight: var(--bold);
  }

  p.lede {
   max-width: 32em;
   font-size: var(--text-small);
   max-width:
  }

  /* Why is this not available in TW? */
  .text-white {
   color: white;
  }

  /* Maybe add to TW? More: https://github.com/mlibrary/design-system/blob/master/packages/docs/styles/_maybe-tailwind.scss */
  .hover\:shadow-outline:hover {
   box-shadow: 0 0 0 2px white, 0 0 0 3px var(--color-neutral-400);
  }

  .prose>*+* {
   margin-top: var(--space-medium);
  }
 </style>
 <div class="container prose">

  <h1 class="heading-title">Tailwind CSS experiments</h1>

  <p class="lede">The purpose of this CodePen is to share and learn together how to use tailwind css to build HTML and CSS only components. And from that make revisions to the distribution to improve it.</p>

  <h2 class="heading">Button</h2>

  <button class="bg-blue-100 text-teal-400 px-4 py-3 mt-3 rounded cursor-pointer font-bold hover:shadow-outline text-base no-underline">Normal</button>
  <!-- There is no 'color: white;' option? -->
  <button class="bg-teal-400 text-white px-4 py-3 mt-3 rounded cursor-pointer font-bold hover:shadow-outline text-base no-underline">Important</button>

  <button class="bg-teal-400 text-white px-4 py-3 mt-3 rounded cursor-pointer font-bold hover:shadow-outline text-base no-underline">
   <svg xmlns="http://www.w3.org/2000/svg" role="presentation" width="24" height="24" fill="currentColor" viewBox="0 0 24 24">
    <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path>
   </svg>
  </button>

 </div>
</body>
              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console