Pen Settings

HTML

CSS

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

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

Auto Save

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

              
                .wrapper
	h1 Pagination. Resize your browser to show interesting effect.
	nav

		ul.pager

			li.pager__item.pager__item--prev
				a.pager__link(href='#')
					svg(xmlns='http://www.w3.org/2000/svg', width='8', height='12', viewbox='0 0 8 12')
						g(fill='none', fill-rule='evenodd')
							path(fill='#33313C', d='M7.41 1.41L6 0 0 6l6 6 1.41-1.41L2.83 6z')
											
			li.pager__item
				a.pager__link(href='#') ...

			li.pager__item
				a.pager__link(href='#') 1

			li.pager__item.active
				a.pager__link(href='#') 2

			li.pager__item
				a.pager__link(href='#') 3
				
			li.pager__item
				a.pager__link(href='#') 4
				
			li.pager__item
				a.pager__link(href='#') 5
				
			li.pager__item
				a.pager__link(href='#') 6
				
			
			li.pager__item
				a.pager__link(href='#') ...

			li.pager__item.pager__item--next
				a.pager__link(href='#')
					svg(xmlns='http://www.w3.org/2000/svg', width='8', height='12', viewbox='0 0 8 12')
						g(fill='none', fill-rule='evenodd')
							path(fill='#33313C', d='M7.41 1.41L6 0 0 6l6 6 1.41-1.41L2.83 6z')
              
            
!

CSS

              
                $accent: #ffb74d
$text_color: #2f3640
@function rem($px)
	@return $px / 16px + 0rem
	@return $px

html
	font-family: 'Arial', sans-serif
	font-size: 12px
	background-color: #edeff0

html, body
	height: 100%
	background-color: #edeff0


body
	display: flex
	align-items: center

.wrapper
	width: 400px
	// height: calc(100% - 40px)
	padding: 20px
	margin: 20px auto
	background-color: #ffffff
	box-shadow: 0 1px 2px 0 #c9ced1
	border-radius: 4px

h1
	font-size: 20px
	font-weight: bold
	margin-bottom: 20px

/* ------------------------------ PAGINTION BEGIN ------------------------------ */
.pager
	margin: 0 0 rem(60px)
	font-size: 0
	text-align: center
	&__item
		display: inline-block
		vertical-align: top
		font-size: rem(18px)
		font-weight: bold
		margin: 0 2px
		&.active
			.pager__link
				background-color: $accent
				border-color: $accent
				color: #fff
				text-decoration: none
		&--prev, &--next
			svg
				width: 8px
				height: 12px
		&--next
			.pager__link
				svg
					transform: rotate(180deg)
					transform-origin: center center

	&__link
		position: relative
		border-radius: 4px
		display: block
		text-align: center
		width: rem(42px)
		height: rem(42px)
		line-height: rem(42px)
		margin-left: -1px
		color: $text_color
		text-decoration: none
		transition: .3s
		&:hover, &:focus, &:active
			background-color: $accent
			border-color: $accent
			color: #fff
			text-decoration: none
			svg path
				fill: #fff
	.pager__item.active + .pager__item, .pager__item:hover + .pager__item
		.pager__link
			border-left-color: $accent


@media screen and (max-width: 576px)
	.pager
		&__item
			position: absolute
			top: -9999px
			left: -9999px
			&.active, &:first-of-type, &:last-of-type, &:nth-of-type(2), &:nth-last-of-type(2)
				position: initial
				top: initial
				left: initial
		&__item.active
			& + li
				position: initial
				top: initial
				left: initial

/* ------------------------------ PAGINTION END ------------------------------ */
              
            
!

JS

              
                
              
            
!
999px

Console