Pen Settings



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


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


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.


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.


                <!-- Google Fonts -->
<link href=',300,700' rel='stylesheet' type='text/css'>

<!-- Custom Element -->
<author-card data-image="" data-name="Fili Santillán" data-country="México" data-url=""></author-card>


  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  font-family: 'Josefin Sans', sans-serif;
  color: white;

/* Author-card */
  text-align: center;
  padding: 3em 1.5rem;
  background: #1E252A;
  border-radius: 7px;

/* Author-card Image*/
author-card::shadow .x-image{
  transition: 1s;

/* Author-card Image animation*/
author-card::shadow .x-image:hover{
  transform: rotate(360deg);

/* Author-card Name*/
author-card::shadow .x-name{
  color: #4299D4;
  font-size: 3.5rem;
  margin: 3rem 0 0.5rem 0;

/* Author-card Country*/
author-card::shadow .x-country{
  display: block;
  font-size: 2rem;
  font-weight: 700;

/* Author-card Button*/
author-card::shadow .x-button{
  padding: 0.8rem 2rem;
  display: inline-block;
  text-decoration: none;
  color: #1E252A;
  background: #4299D4;
  border-radius: 5px;
  box-shadow: 4px 4px white;
  font-size: 1.2rem;
  margin: 0.8rem 0 0 0;
  transition: 0.3s;

/* Author-card Button animation*/
author-card::shadow .x-button:hover{
  transform: scale(1.1);


                var authorCard = Object.create(HTMLElement.prototype);

authorCard.createdCallback = function() {

    var shadow = this.createShadowRoot();
    // Image
    var image = document.createElement("img");
    image.src = this.getAttribute("data-image");
    image.alt = this.getAttribute("data-name");
    image.width = "150";
    image.height = "150";
    image.className = "x-image";
    // Name
    var name = document.createElement("h1");
    name.innerText = this.getAttribute('data-name');
    name.className = "x-name";
    // Country
    var country = document.createElement("span");
    country.innerText = this.getAttribute('data-country');
    country.className = "x-country";
    var button = document.createElement("a");
    button.innerText = "Web Site";
    button.href = this.getAttribute("data-url"); = "blank";
    button.className = "x-button";

var xAuthorCard = document.registerElement("author-card", { 
    prototype: authorCard