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

              
                <div class="page">
	<div class="page__section">
		<span class="page__name-effect">type #1</span>
		<div class="page__group">
			<article class="news">
				<header class="news__header">
					<time class="news__date" datetime="2019-05-31">
						<span class="news__day">31</span>
						<span class="news__year">May 2019</span>
					</time>
					<h3 class="r-title news__title">
						<a href="#0" class="r-link animated-underline animated-underline_type1 news__link">
							Implementing Private Variables In JavaScript
						</a>
					</h3>	
				</header>
				<div class="news__content">
					<p>
						JavaScript (or ECMAScript) is the programming language that powers the web. Created in May 1995 by Brendan Eich, it’s found its place as a widely-used and versatile technology. Despite its success, it’s been met with its fair share of criticism, especially for idiosyncrasies. Things like objects being casted to string form when used as indices, 1 == "1" returning true, or the notoriously confusing this keyword. A particularly interesting quirk though, is the existence of various techniques for variable privacy…
					</p>
				</div>
			</article>
			<article class="news arabic">
				<header class="news__header">
					<time class="news__date" datetime="2019-05-31">
						<span class="news__day">3</span>
						<span class="news__year">June 2019</span>
					</time>
					<h3 class="r-title news__title">
						<a href="#0" class="r-link animated-underline animated-underline_type1 news__link">
							Do you need an ICON ONLY button without screwing up the accessibility?
						</a>
					</h3>	
				</header>
				<div class="news__content">
					<p>
						The first consideration is: do you really? If you can, having text next to your icons is proven over and over again to be the most accessible and clearest UX (see Apple's latest blunder). But if you need to (and I get it, sometimes you need to), Sara Soueidan and Scott O'Hara have a pair of articles that nicely lay out all the options and present actual research on this topic.					</p>
				</div>
			</article>
		</div>
	</div>
	<div class="page__section">
		<span class="page__name-effect">type #2</span>
		<div class="page__group">
			<article class="news">
				<header class="news__header">
					<time class="news__date" datetime="2019-05-31">
						<span class="news__day">31</span>
						<span class="news__year">May 2019</span>
					</time>
					<h3 class="r-title news__title">
						<a href="#0" class="r-link animated-underline animated-underline_type2 news__link">
							Implementing Private Variables In JavaScript
						</a>
					</h3>	
				</header>
				<div class="news__content">
					<p>
						JavaScript (or ECMAScript) is the programming language that powers the web. Created in May 1995 by Brendan Eich, it’s found its place as a widely-used and versatile technology. Despite its success, it’s been met with its fair share of criticism, especially for idiosyncrasies. Things like objects being casted to string form when used as indices, 1 == "1" returning true, or the notoriously confusing this keyword. A particularly interesting quirk though, is the existence of various techniques for variable privacy…
					</p>
				</div>
			</article>
			<article class="news arabic">
				<header class="news__header">
					<time class="news__date" datetime="2019-05-31">
						<span class="news__day">3</span>
						<span class="news__year">June 2019</span>
					</time>
					<h3 class="r-title news__title">
						<a href="#0" class="r-link animated-underline animated-underline_type2 news__link">
							Do you need an ICON ONLY button without screwing up the accessibility?
						</a>
					</h3>	
				</header>
				<div class="news__content">
					<p>
						The first consideration is: do you really? If you can, having text next to your icons is proven over and over again to be the most accessible and clearest UX (see Apple's latest blunder). But if you need to (and I get it, sometimes you need to), Sara Soueidan and Scott O'Hara have a pair of articles that nicely lay out all the options and present actual research on this topic.					</p>
				</div>
			</article>
		</div>
	</div>
	<div class="page__section">
		<span class="page__name-effect">type #3</span>
		<div class="page__group">
			<article class="news">
				<header class="news__header">
					<time class="news__date" datetime="2019-05-31">
						<span class="news__day">31</span>
						<span class="news__year">May 2019</span>
					</time>
					<h3 class="r-title news__title">
						<a href="#0" class="r-link animated-underline animated-underline_type3 news__link">
							Implementing Private Variables In JavaScript
						</a>
					</h3>	
				</header>
				<div class="news__content">
					<p>
						JavaScript (or ECMAScript) is the programming language that powers the web. Created in May 1995 by Brendan Eich, it’s found its place as a widely-used and versatile technology. Despite its success, it’s been met with its fair share of criticism, especially for idiosyncrasies. Things like objects being casted to string form when used as indices, 1 == "1" returning true, or the notoriously confusing this keyword. A particularly interesting quirk though, is the existence of various techniques for variable privacy…
					</p>
				</div>
			</article>
			<article class="news arabic">
				<header class="news__header">
					<time class="news__date" datetime="2019-05-31">
						<span class="news__day">3</span>
						<span class="news__year">June 2019</span>
					</time>
					<h3 class="r-title news__title">
						<a href="#0" class="r-link animated-underline animated-underline_type3 news__link">
							Do you need an ICON ONLY button without screwing up the accessibility?
						</a>
					</h3>	
				</header>
				<div class="news__content">
					<p>
						The first consideration is: do you really? If you can, having text next to your icons is proven over and over again to be the most accessible and clearest UX (see Apple's latest blunder). But if you need to (and I get it, sometimes you need to), Sara Soueidan and Scott O'Hara have a pair of articles that nicely lay out all the options and present actual research on this topic.					</p>
				</div>
			</article>
		</div>
	</div>
	<div class="page__section">
		<span class="page__name-effect">type #4</span>
		<div class="page__group">
			<article class="news">
				<header class="news__header">
					<time class="news__date" datetime="2019-05-31">
						<span class="news__day">31</span>
						<span class="news__year">May 2019</span>
					</time>
					<h3 class="r-title news__title">
						<a href="#0" class="r-link animated-underline animated-underline_type4 news__link">
							Implementing Private Variables In JavaScript
						</a>
					</h3>	
				</header>
				<div class="news__content">
					<p>
						JavaScript (or ECMAScript) is the programming language that powers the web. Created in May 1995 by Brendan Eich, it’s found its place as a widely-used and versatile technology. Despite its success, it’s been met with its fair share of criticism, especially for idiosyncrasies. Things like objects being casted to string form when used as indices, 1 == "1" returning true, or the notoriously confusing this keyword. A particularly interesting quirk though, is the existence of various techniques for variable privacy…
					</p>
				</div>
			</article>
			<article class="news arabic">
				<header class="news__header">
					<time class="news__date" datetime="2019-05-31">
						<span class="news__day">3</span>
						<span class="news__year">June 2019</span>
					</time>
					<h3 class="r-title news__title">
						<a href="#0" class="r-link animated-underline animated-underline_type4 news__link">
							Do you need an ICON ONLY button without screwing up the accessibility?
						</a>
					</h3>	
				</header>
				<div class="news__content">
					<p>
						The first consideration is: do you really? If you can, having text next to your icons is proven over and over again to be the most accessible and clearest UX (see Apple's latest blunder). But if you need to (and I get it, sometimes you need to), Sara Soueidan and Scott O'Hara have a pair of articles that nicely lay out all the options and present actual research on this topic.
					</p>
				</div>
			</article>
		</div>
	</div>	
	<div class="page__section">
		<span class="page__name-effect">type #5</span>
		<div class="page__group">
			<article class="news">
				<header class="news__header">
					<time class="news__date" datetime="2019-05-31">
						<span class="news__day">31</span>
						<span class="news__year">May 2019</span>
					</time>
					<h3 class="r-title news__title">
						<a href="#0" class="r-link animated-underline animated-underline_type5 news__link">
							Implementing Private Variables In JavaScript
						</a>
					</h3>	
				</header>
				<div class="news__content">
					<p>
						JavaScript (or ECMAScript) is the programming language that powers the web. Created in May 1995 by Brendan Eich, it’s found its place as a widely-used and versatile technology. Despite its success, it’s been met with its fair share of criticism, especially for idiosyncrasies. Things like objects being casted to string form when used as indices, 1 == "1" returning true, or the notoriously confusing this keyword. A particularly interesting quirk though, is the existence of various techniques for variable privacy…
					</p>
				</div>
			</article>
			<article class="news arabic">
				<header class="news__header">
					<time class="news__date" datetime="2019-05-31">
						<span class="news__day">3</span>
						<span class="news__year">June 2019</span>
					</time>
					<h3 class="r-title news__title">
						<a href="#0" class="r-link animated-underline animated-underline_type5 news__link">
							Do you need an ICON ONLY button without screwing up the accessibility?
						</a>
					</h3>	
				</header>
				<div class="news__content">
					<p>
						The first consideration is: do you really? If you can, having text next to your icons is proven over and over again to be the most accessible and clearest UX (see Apple's latest blunder). But if you need to (and I get it, sometimes you need to), Sara Soueidan and Scott O'Hara have a pair of articles that nicely lay out all the options and present actual research on this topic.
					</p>
				</div>
			</article>
		</div>
	</div>	
</div>

              
            
!

CSS

              
                
/*
=====
DEPENDENCES
=====
*/

@import url('https://fonts.googleapis.com/css?family=Amaranth:700,400&display=swap');

/* The component will reset browser's styles of link */

.r-link{
	--uirLinkDisplay: var(--rLinkDisplay, inline-block);
	--uirLinkTextColor: var(--rLinkTextColor);
	--uirLinkTextDecoration: var(--rLinkTextDecoration, none);

	display: var(--uirLinkDisplay) !important;
	color: var(--uirLinkTextColor) !important;
	text-decoration: var(--uirLinkTextDecoration) !important;
}

/* The component will reset browser's styles of titles */

.r-title{
	--uirTitleMarginTop: var(--rTitleMarginTop, 0);
	--uirTitleMarginBottom: var(--rTitleMarginBottom, 0);

	margin-top: var(--uirTitleMarginTop) !important;
	margin-bottom: var(--uirTitleMarginBottom) !important;
}

/*
=====
CORE STYLES
=====
*/

.animated-underline{
	--uiAnimatedUnderlineWidth: var(--animatedUnderlineWidth, 100%);
	--uiAnimatedUnderlineHeight: var(--animatedUnderlineHeight, 2px);
	--uiAnimatedUnderlineBgColor: var(--animatedUnderlineBgColor, currentColor);
	--uiAnimatedUnderlinePositionX: var(--animatedUnderlinePositionX, left);
	--uiAnimatedUnderlinePositionY: var(--animatedUnderlinePositionY, bottom);

	/*
		1. For multi-line animated underline the "inline" value for the display property is compulsory.
		2. Adds opportunity to create multi-line padding
	*/

	--rLinkDisplay: inline; /* 1 */

	background-image: linear-gradient(0, var(--uiAnimatedUnderlineBgColor) 0, var(--uiAnimatedUnderlineBgColor));
	background-size: var(--uiAnimatedUnderlineWidth) var(--uiAnimatedUnderlineHeight);
	background-position: var(--uiAnimatedUnderlinePositionX) var(--uiAnimatedUnderlinePositionY);
	background-repeat: no-repeat;
	
	-webkit-box-decoration-break: clone; /* 2 */
	box-decoration-break: clone; /* 2 */
	
	will-change: background-size;
	transition: background-size .25s cubic-bezier(0.785, 0.135, 0.15, 0.86);
}

/*
=====
SETTINGS
=====
*/

:root{
	--animatedUnderlineHeight: 1rem;
	--animatedUnderlineBgColor: var(--accentColor);
}	

.animated-underline_type1{
	--animatedUnderlineWidth: 100%;
}

.animated-underline_type1:hover{
	--animatedUnderlineHeight: 100%;
}

.animated-underline_type2{
	--animatedUnderlineWidth: 100%;
}

.animated-underline_type2:hover{
	--animatedUnderlineWidth: 0;
}

.animated-underline_type3{
	--animatedUnderlineHeight: 0;
}

.animated-underline_type3:hover{
	--animatedUnderlineHeight: 100%;
}

.animated-underline_type4{
	--animatedUnderlineWidth: 0;
}

.animated-underline_type4:hover{
	--animatedUnderlineWidth: 100%;
}

.animated-underline_type5{
	--animatedUnderlineWidth: 100%;
	--animatedUnderlineHeight: 5px;
	--animatedUnderlinePositionY: 90%;
}

.animated-underline_type5:hover{
	--animatedUnderlineHeight: 1rem;
}

/*
=====
DEMO
=====
*/

:root{
	--mainColor: #673AB7;
	--accentColor: #ff7eb2;
	--accentColorDark: #f15493;
	--blackColor: #222;
	--whiteColor: #fff;
	--rLinkTextColor: var(--blackColor);
}	

body{
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Open Sans, Ubuntu, Fira Sans, Helvetica Neue, sans-serif;
	color: var(--blackColor);
	background-color: #f0f0f0;
}

.page{
	max-width: 1300px;
	margin-left: auto;
	margin-right: auto;
}

.page__name-effect{
	display: inline-flex;
	align-items: center;
	font-weight: 700;
	font-size: .875rem;
}

.page__name-effect::before{
	content: "";
	width: 3.75rem;
	height: 2px;
	background-color: var(--mainColor);
	margin-top: .25rem;
	margin-right: .625rem;
}

.page__section:nth-child(n+2){
	margin-top: 5rem;
}

.page__group{
	margin-top: 2rem;
}

.news{
	position: relative;

	padding: 70px 6%;
	border-top: 6px solid var(--mainColor);
	border-radius: 4px;

	box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.12), 0 1px 5px 0 rgba(0,0,0,.2);
	background-color: var(--whiteColor);
}

.news:nth-child(n+2){
	margin-top: 3rem;
}

.news__date{
	font-size: 0.9375rem;
	font-weight: 700;
}

.news__title{
	font-family: 'Amaranth', sans-serif;
	line-height: 1.25;
}

.news__link::after{
	content: "";
	width: 100%;
	height: 100%;

	position: absolute;
	top: 0;
	left: 0;
}

.news__content{
	margin-top: 1.875rem;
}

p{
	margin-top: 0;
	margin-bottom: 0;
	line-height: 1.78;
}

@media (max-width: 640px){

	html{
		font-size: 93.75%;
	}
}

@media (min-width: 641px) and (max-width: 768px){

	html{
		font-size: 100%;
	}
}

@media (min-width: 769px) and (max-width: 960px){

	html{
		font-size: 106.25%;
	}
}

@media (min-width: 961px){

	html{
		font-size: 112.5%;
	}
}

@media (max-width: 960px){

	.page{
		padding-top: 50px;
		padding-bottom: 50px;
	}

	.page__name-effect{
		padding-left: .625rem;
		padding-right: .625rem;
	}

	.news__title{
		--rTitleMarginTop: .75rem;
		font-size: 1.75rem;
	}
}

@media (min-width: 961px){

	.page{
		padding: 80px 50px;
	}

	.news__header{
		display: flex;
		align-items: flex-start;

		padding-left: 1.5rem;
		padding-right: 2.5rem;
	}

	.news__date{
		flex-shrink: 0;
		font-family: 'Amaranth', sans-serif;

		margin-right: 40px;
		text-align: center;
	}

	.news__day{
		line-height: 1;
		display: block;
		font-size: 4.333rem;
		color: var(--accentColorDark);
	}

	.news__year{
		display: block;
		font-size: 1rem;
		margin-top: 5px;
	}

	.news__title{
		font-size: 2.5rem;
	}	
}

@media (min-width: 1301px){

	.page__group{
		padding-left: 190px;
		padding-right: 100px;
	}
}
              
            
!

JS

              
                
              
            
!
999px

Console