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.
/* ==========================================================================
CRAFTED - Color Scheme
Designed by Jacob Lett of Bootstrap Creative
http://bootstrapcreative.com/
@bootstrapC
https://bootstrapcreative.com/website-themes/crafted-bigcommerce-theme/frequently-asked-questions-crafted-bigcommerce-theme-v1/#FAQ2
========================================================================== */
/* Instructions
1. Edit the color variables below
2. Click on "View Compiled" in the right and corner of this panel
3. Copy the compiled code into the very bottom of your custom.css file in your template directory
*/
@link-lt: #f2ada6;
@link: #de9891;
@nav-dk: #9fbdd7;
@nav: #b1d2ed;
@nav-lt: #b9d9f4;
@brown: #9a6f53;
@text: #505050;
@gray: #757575;
@gray-lt: #CCCCCC;
@tan: #f5f5f1;
.SortBox,
.AddToWishlistLink .wishlist-button{color:@link;}
.TopMenu{color:@text;background:#ffffff;}
.TopMenu li{border-right:1px solid #ffffff;}
.TopMenu a{color:#6a6a6a;}
.TopMenu a:hover{color:#5d5d5d;}
.header-logo a{color:@brown;}
.PageMenu .inner{background:@nav;}
.PageMenu a{color:#ffffff;}
.PageMenu li ul{background:@nav-dk;}
.PageMenu li ul li a{color:#ffffff;}
.PageMenu li ul:before{border-color:transparent transparent @nav-dk transparent;}
.header{background:@tan;}
.page{background:@tan;}
.footer{background:@nav;color:#ffffff;}
.footer-main a{color:#ffffff;}
.footer-main h4{color:#ffffff;}
.footer-links{background:@nav;color:#ffffff;}
.footer-links a{color:#ffffff;}
.footer-links a:hover{color:#fafdfd;}
.newsletter-subscription{background-color:@nav-lt;}
.newsletter-subscription h4{color:#ffffff;}
body,
input,
select,
textarea,
input.Textbox,
input[type="text"],
#SearchForm input,
.HorizontalFormContainer dd .selector span,
.fastCartTop div,
.list-icon li{color:@gray;}
#SearchForm .Button{background-color:@nav;}
#ModalContent,
.ModalContent,
.CurrencyChooser a span{color:@gray !important;}
a,
.Left li li a,
.Left #SideCategoryList li a,
.Left .slist li a,
.Left .afterSideShopByBrand a,
.Left #GiftCertificatesMenu li a,
.Left #SideAccountMenu li a,
.Left #SideCategoryList li li a,
.Left .slist li li a,
.TabNav li.Active a,
.ModalContent h4 a:hover,
.footer a:hover{color:@link-lt;}
.page-content #LayoutColumn2 a.pname,
#ModalContent a,
.ModalContent a,
.recaptchatable a{color:@link-lt !important;}
.Left li a.active:hover{border-color:@link-lt;}
.icon-add:hover{background-color:@link-lt !important;}
.multiStep li a{color:@link;}
.Left li a.active,
a:hover,
a.alt,
p a,
a.NextLink,
.currency-converter p span,
.BlockContent.PageContent a,
.page-content #LayoutColumn2 a,
.Left #SideCategoryList li a:hover,
.Left .slist li a:hover,
.Left .afterSideShopByBrand a:hover,
.Left #GiftCertificatesMenu li a:hover,
.Left #SideAccountMenu li a:hover,
.PageMenu li ul li a:hover,
.Breadcrumb li a{color:@link;}
.recaptchatable a:hover,
.page-content #LayoutColumn2 a.pname:hover,
#ModalContent a:hover,
.ModalContent a:hover,
.Breadcrumb li a:hover{color:@link!important;}
a.alt:hover{background-color:@link;color:#ffffff;}
.multiStep li.ActivePage h4{border-bottom:4px solid @link;}
.icon-add{background:@link url("../images/add.png") no-repeat scroll 50% 50%;}
h1,
.h1,
h2,
.h2,
h3,
.h3,
h4,
.h4,
h5,
.h5,
h6,
.h6{font-family:'Open Sans','Arial','sans-serif';color:@brown;font-weight:600;}
h1,
.h1{font-family:'Open Sans','Arial','sans-serif';color:@brown;}
.PrimaryProductDetails h1{color:@brown;}
.FeaturedProducts h2,
.TopSellers h2,
.NewProducts h2,
#SimilarProductsByCustomerViews h2{color:@brown;}
.productOptionViewProductPickListWithImage td{border-bottom:1px dotted #e2e2e2;}
.TopMenu li.Flag img.Selected{border:2px solid #e2e2e2;}
.productOptionViewRectangle .option.selectedValue label{border:1px solid #afafaf !important;}
.productOptionPickListSwatch .selectedValue .textureContainer,
.productOptionPickListSwatch .selectedValue .swatchColours{border:1px solid #e2e2e2 !important;border-color:#3c3c3c !important;}
.productOptionPickListSwatch .textureContainer,
.productOptionPickListSwatch .swatchColours,
.productOptionViewRectangle .option label,
.recaptchatable #recaptcha_response_field,
.zoomWrapper,
#ProductDetails .ProductTinyImageList ul li.selected{border:1px solid #e2e2e2 !important;}
.CurrencyList dd,
#SearchForm .Button,
#SearchForm input.Textbox,
select,
hr,
input.Textbox,
textarea,
input[type="text"],
input[type="password"],
.QuickSearch,
.SharePublicWishList,
.ExpressCheckoutBlock .ExpressCheckoutTitle,
.TabNav li a,
.HowToPay,
.NotifyMessage,
.QuickSearchResult .QuickSearchResultImage,
.CurrencyChooser,
.selected-currency,
div.uploader,
div.selector,
.recaptchatable{border:1px solid #e2e2e2;}
.ExpressCheckoutBlockCompleted .ExpressCheckoutCompletedContent,
div.uploader span.action{border-left:1px solid #e2e2e2;}
.TitleHeading,
.TabNav{border-bottom:1px solid #e2e2e2;}
.ProductList .pname{color:@brown;}
.ProductList .p-price{color:@nav;}
.ProductList.List .ProductDetails{border-top:1px solid #e2e2e2;}
.btn{background-color:@link;color:#ffffff;}
.btn:hover{background-color:@link-lt !important;color:#ffffff;}
.btn.alt{background-color:@nav;color:#ffffff;}
a.btn.alt{color:#ffffff;}
.btn.alt:hover{background-color:@nav-dk !important;}
.btn.text{color:#fff5f2;}
.btn.add-to-cart{background-color:@link;}
.btn.wishlistTrigger{background-color:@gray;}
#prodAccordion .subtitle{color:#333333;}
/* ==========================================================================
UTILITY - Crafted
========================================================================== */
body.crafted{background-color:@nav;}
/* button color - fixes some default button colors*/
#SearchForm .Button{background-color:@link;}
#SearchForm .Button:hover{background-color:@link-lt;}
.SocialConnect a:hover:before{color:@link-lt !important;}
.crafted .productOptionViewRectangle .list-horizontal .selectedValue label{background:@link !important;color:#ffffff!important;border-color:#333;}
.productOptionPickListSwatch .selectedValue .textureContainer,
.productOptionPickListSwatch .selectedValue .swatchColours{border:3px solid @link !important;border-color:@link !important;}
.quick-view-product-details-container .required,
.quick-view-product-details-container .Required,
.ProductMain .Required,
.required{color:#e60c0c !important;}
.qtip-default{border-color:#F1D031;background-color:#FFFFA3;color:#555555;}
.qtip-default .qtip-titlebar{background-color:#ffef93;}
.qtip-default .qtip-icon{border-color:#CCC;background:#F1F1F1;color:#777777;}
.qtip-default .qtip-titlebar .qtip-close{border-color:#AAA;color:#111111;}
.qtip-light{background-color:#fff;border-color:#E2E2E2;color:#454545;}
.qtip-light .qtip-titlebar{background-color:#f1f1f1;}
.qtip-dark{background-color:@text;border-color:#303030;color:#f3f3f3;}
.qtip-dark .qtip-titlebar{background-color:#404040;}
.qtip-dark .qtip-icon{border-color:#444444;}
.qtip-dark .qtip-titlebar .ui-state-hover{border-color:#303030;}
.qtip-cream{background-color:#FBF7AA;border-color:#F9E98E;color:#a27d35;}
.qtip-cream .qtip-titlebar{background-color:#f0de7d;}
.qtip-red{background-color:#F78B83;border-color:#D95252;color:#912323;}
.qtip-red .qtip-titlebar{background-color:#f06d65;}
.qtip-red .qtip-icon{border-color:#d95252;}
.qtip-red .qtip-titlebar .ui-state-hover{border-color:#d95252;}
.qtip-green{background-color:#CAED9E;border-color:#90D93F;color:#3f6219;}
.qtip-green .qtip-titlebar{background-color:#b0de78;}
.qtip-blue{background-color:#E5F6FE;border-color:#ADD9ED;color:#5e99bd;}
.qtip-blue .qtip-titlebar{background-color:#d0e9f5;}
#owl-demo .item{background:#3fbf79;color:#FFF;}
.owl-controls{-webkit-tap-highlight-color:rgba(0,0,0,0);}
/* Styling Next and Prev buttons */
.owl-theme .owl-controls .owl-buttons div{color:#FFF;background:@link;}
.owl-theme .owl-controls .owl-page span{background:@link;}
/* If PaginationNumbers is true */
.owl-theme .owl-controls .owl-page span.owl-numbers{color:#FFF;}
div#fancy_overlay,
#ModalOverlay{background:@tan !important;}
.crafted table.slideText tr{background-color:inherit!important;}
.crafted table.slideText td{background-color:inherit;}
.crafted div#fancy_div{background-color:#fff;}
hr{background-color:#e2e2e2;}
.crafted blockquote{color:@brown;}
.crafted th{background-color:@tan;border-bottom:1px solid #e2e2e2;}
.crafted tbody tr:nth-child(odd){background-color:@tan;}
#LogoContainer h1 a:hover{color:@brown;}
#LogoContainer h1 a:hover span{text-shadow:2px 2px 2px #CCC;}
.TopMenu{border-bottom:1px solid #e2e2e2;}
.TopMenu li{border-right:1px solid #e2e2e2;}
.TopMenu .CartLink a{color:@link-lt;}
.TopMenu a:hover{color:@link;}
.TopMenu .CartLink a .cartCounter{color:#e2e2e2;}
.header .sf-menu ul{box-shadow:2px 2px 6px rgba(0,0,0,0.2);}
.header .sf-menu a{color:#ffffff;}
.header .sf-menu li{background:@nav;}
.header .sf-menu ul li{background:none;}
.header .sf-menu ul{background:@nav-dk;}
/*dropdown*/
.header .sf-menu ul ul li{background:@nav-dk;}
/*dropdown hover*/
.header .sf-menu li:hover,
.header .sf-menu li.sfHover,
.header .sf-menu li.active{background:@nav-dk;}
.header .sf-menu li li:hover{background-color:@nav-lt;}
/* styling for both css and generated arrows */
.header .sf-arrows .sf-with-ul:after{/* order of following 3 rules important for fallbacks to work */
border:5px solid transparent;border-top-color:#dFeEFF;/* edit this to suit design (no rgba in IE8) */
border-top-color:rgba(255,255,255,0.5);}
/*** DROPDOWN MENU STYLES ***/
/* styling for right-facing arrows */
.header .sf-arrows ul .sf-with-ul:after{border-left-color:#dFeEFF;/* edit this to suit design (no rgba in IE8) */
border-left-color:rgba(255,255,255,0.5);}
.header .sf-arrows ul li > .header .sf-with-ul:focus:after,
.header .sf-arrows ul li:hover > .sf-with-ul:after,
.header .sf-arrows ul .sfHover > .sf-with-ul:after{border-left-color:white;}
#HeaderLower #SideCategoryList .SideCategoryListClassic ul:first-child{color:#fff;}
.header .PageMenu li ul li a,
.PageMenu li ul li a:hover{color:white;}
.usp .circle{color:@nav;background-color:white;}
#QuickSearch a{color:@link-lt !important;}
.TopMenu .name a{color:@link-lt!important;}
#AjaxLoading{background-color:@nav;}
/* ==========================================================================
FOOTER - Crafted
========================================================================== */
.footer-links,
.footer-main{background-color:inherit;font-size:12px!important;}
.footer-links .js-drawermenu-currency-converter,
.footer-links .js-drawermenu-currency-converter span{color:#ffffff !important;}
.footer a:hover,
.footer .SocialConnect a:hover:before{text-shadow:2px 2px 4px #7F7F7F;color:#ffffff !important;}
.footer-links .inner{border-top:1px solid #ffffff;}
.banner_home_page_bottom p img,
.banner_home_page_bottom p img,
.banner_category_page_bottom p img,
.banner_brands_page_bottom p img,
.banner_brand_page_bottom p img,
.banner_search_page_bottom p img{border:2px solid @tan;}
.banner_home_page_bottom p a:hover img,
.banner_home_page_bottom p a:hover img,
.banner_category_page_bottom p a:hover img,
.banner_brands_page_bottom p a:hover img,
.banner_brand_page_bottom p a:hover img,
.banner_search_page_bottom p a:hover img{border:2px solid @link;}
#SideCurrencySelector{color:@gray!important;}
.slideWrap{background-color:@tan;}
.feature .owl-theme .owl-controls .owl-buttons div,
.feature .owl-theme .owl-controls .owl-page span{border:1px solid #e2e2e2;color:#e2e2e2;}
.feature .owl-theme .owl-controls .owl-page span{background:#e2e2e2;}
.banner_home_page_top .title,
.banner_category_page_top .title,
.banner_brands_page_top .title,
.banner_brand_page_top .title,
.banner_search_page_top .title{color:#fff;}
.banner_home_page_top .cta,
.banner_category_page_top .cta,
.banner_brands_page_top .cta,
.banner_brand_page_top .cta,
.banner_search_page_top .cta{background-color:@link;border-top:2px solid white;width:100%;color:#ffffff;}
.banner_home_page_top:hover .cta,
.banner_category_page_top:hover .cta,
.banner_brands_page_top:hover .cta,
.banner_brand_page_top:hover .cta,
.banner_search_page_top:hover .cta{background-color:@link-lt;}
.profile .desc{color:@brown;}
.profile .picture .gravatar{border:1px solid #e2e2e2;}
#SearchForm .Button{color:#ffffff;}
#search_query::-webkit-input-placeholder,
#search_query:-moz-placeholder,
#search_query::-moz-placeholder,
#search_query:-ms-input-placeholder{color:#FFFFFF;}
.footer {
background-image: none;
background-repeat: repeat;
background-position: 0 -10px;
background-color:@nav!important;
}
/* ==========================================================================
PRODUCT LISTINGS - Crafted
========================================================================== */
/*
*
Container box styles - rounded corners,padding and borders
*
*/
/* Container for full page content */
.contentWrap,
.page-content,
.sitemap .Content,
.Message,
.newsletterSubscribe .full-width,
.search .full-width,
.checkoutExpress .fullwidth,
.checkoutExpress .CreateAccount,
.checkoutExpress .AccountLogin,
.checkoutAddress .Content,
.checkoutShipper .Content,
.checkoutConfirm .Content,
.compare .fullwidth,
.brands .Content,
.SubBrandList{background-color:#ffffff;border:1px solid #e2e2e2;}
/* adds background and padding to box */
.ProductList li,
.profile,
.ProductsSlide .ProductList li,
#ProductDetails,
.owl-carousel.ProductList .list-item,
.productlist-page .Left > div,
.Breadcrumb ul,
.CategoryDescription{background-color:#ffffff;}
/* Adds 1px gray border*/
.ProductList .ProductImage,
.ProductList li,
.profile,
.productPage .PrimaryProductDetails,
.owl-carousel.ProductList .list-item,
.owl-carousel.ProductList .list-item .ProductImage,
.productlist-page .Left > div,
.Breadcrumb ul,
.CategoryDescription,
.fastCartSummaryBox{border:1px solid #e2e2e2;}
.Content .ProductList .ProductImage,
.brand-img,
.ProductList .ProductImage,
#ProductDetails .ProductThumbImage{background-color:#ffffff;}
.fastCartSummaryBox{background-color:#ffffff;}
.ProductList .AddToWishlistLink a{color:#ffffff !important;}
.ProductList .AddToWishlistLink a:hover{color:@link-lt;}
.ProductImage .QuickView{background-color:@tan;}
/* ==========================================================================
LOGIN - Crafted
========================================================================== */
.login .CreateAccount{background-color:@tan;}
.order .NotifyMessage{background-color:@tan;}
.checkoutExpress .ExpressCheckoutTitle{background-color:@tan;}
.ExpressCheckoutTitle{background-color:@tan;}
#prodAccordion .subtitle{color:@link;}
.Breadcrumb{background-color:#f5f5f5;}
.Breadcrumb ul > li + li:before{color:#e2e2e2;}
.Breadcrumb ul > .active{color:#999999;}
.productSlide .nav span{color:@brown;}
.prev,
.next{color:@link-lt;}
.ProductList .p-price .RetailPriceValue,
.ProductPrice strike{color:#e2e2e2;}
.saleTag{background-color:@nav;color:#ffffff;}
.SoldOutTag{background-color:white;background:rgba(255,255,255,0.8);border-top:2px solid white;border-bottom:2px solid white;color:@gray;}
.productPage .ProductPrice{color:@nav;}
.SortBox{color:@link-lt;}
.SortBox label,
.SearchSorting label{color:@gray;}
.ProductList li .QuickViewBtn,
.ProductList .list-item .QuickViewBtn{color:white!important;}
.SocialConnect a:before,
#prodAccordion .subtitle:before,
.featuresList li:before{color:@link;}
.featuresList li:before{color:@link;}
/* icons with container*/
.footer-main .SocialConnect a:before{color:white;}
#prodAccordion{border-top:1px solid #e2e2e2;}
/* ==========================================================================
RESPONSIVE STYLES - Crafted
========================================================================== */
#DrawerMenu .toggleWrap{background-color:#ffffff;}
/* Drawer Menu Styles*/
#ToggleMenu:after,
#DrawerToggleMenu:after{-ms-box-shadow:0 8px 0 2px @nav,0 16px 0 2px @nav,0 24px 0 2px @nav;-moz-box-shadow:0 8px 0 2px @nav,0 16px 0 2px @nav,0 24px 0 2px @nav;-webkit-box-shadow:0 8px 0 2px @nav,0 16px 0 2px @nav,0 24px 0 2px @nav;box-shadow:0 8px 0 2px @nav,0 16px 0 2px @nav,0 24px 0 2px @nav;}
#DrawerMenu a:focus{background-color:@nav-lt !important;}
#DrawerMenu .js-side-account-menu .acctOptions a:first-child{border-bottom:1px solid @nav-dk !important;}
#DrawerMenu{background-color:@nav;color:#ffffff;border-color:@nav-dk !important;}
#DrawerMenu li{border-color:@nav-dk !important;}
#DrawerMenu h3{background:#fff;color:@nav-dk;}
#DrawerMenu .drawer-subcat,
#DrawerMenu .subcat-expand{background:@nav-dk;border-color:@nav-dk !important;}
/* 1024px */
@media screen and (max-width:1024px){}
/* 1000px */
@media screen and (max-width:1000px){}
/* 950px */
@media screen and (max-width:950px){}
/* 768px */
@media screen and (max-width:768px){.TabNav li.Active a{border-bottom:1px solid #e2e2e2;}
}
/* 600px */
@media screen and (max-width:600px){.BillingDetails,
.ShippingDetails{border-top:1px solid #e2e2e2;}
}
/* 480px */
@media screen and (max-width:480px){#cart-amount .Cart .total{background:@link;color:#ffffff;}
#cart-amount .Cart .bag-handle{border:2px solid @link;}
.crafted .PageMenu .inner{background:@nav;}
#Header{border-bottom:2px solid @nav;}
.header-secondary{background-color:#fff!important;}
}
/* ==========================================================================
CROSS BROWSER FIXES - Crafted
========================================================================== */
.lt-ie9 .slideWrap .slide-content .slide-button .hasPrice{background-color:@link;color:#ffffff;}
.lt-ie9 .saleTag{background-color:@nav;color:#ffffff;}
/* END CUSTOM COLOR SCHEME */
Also see: Tab Triggers