cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <p><a href="#" onclick="alert('Default click');" data-am-label="pseudo XL" class="iLink">Button link</a></p>
<p><a href="https://moikrug.ru/vit-1/" data-am-ico="star" data-am-label="XL" class="iLink">Iconed link</a></p>
<div class="iBtn iDdList" data-am-holder>
	<button id="btnMainAction" onclick="alert('WhiteStar click');" hidden="hidden" data-am-baseBtn class="iBtn"><!--IE6fix--></button>
	<input id="ddChkListIsVisible" name="ddChkListIsVisible" type="checkbox" hidden="hidden" data-am-isVisible class="iDdList" />
	<label for="btnMainAction" data-am-ico="star" data-am-label="submit XL" class="iBtn">Click me!</label><label for="ddChkListIsVisible" data-am-label="submit XL" class="iDdList iBtn"></label>
	<ul data-am-ddList class="iDdList">
		<li data-am-item class="iDdList">Action A</li>
		<li data-am-item class="iDdList">Action B</li>
		<li data-am-item class="iDdList">Action C</li>
		<li data-am-item="default" class="iDdList">Action D</li>
	</ul>
</div>
<p>Toolbar: <ul data-am-actionList="hiddenLabels XL" class="iToolbar">
	<li data-am-item class="iToolbar" title="Add to favorites">
		<button id="tlbBtnFav" onclick="alert('Add to favorites is clicked');" data-am-baseBtn class="iBtn"><!--IE6fix--></button>
		<label for="tlbBtnFav" class="iLink" data-am-label="pseudo"><i data-am-ico="fav"></i><span class="iToolbar" data-am-label_i>Add to favorites</span></label>
	</li>
	<li data-am-item class="iToolbar" title="Export">
		<button id="tlbBtnExp" onclick="alert('Export is clicked');" data-am-baseBtn class="iBtn"><!--IE6fix--></button>
		<input id="exportListChk" name="exportListChk" type="checkbox" hidden="hidden" data-am-isVisible class="iDdList" />
		<label for="tlbBtnExp" class="iLink" data-am-label="pseudo"><i data-am-ico="export"></i><span class="iToolbar" data-am-label_i>Export</span></label><label for="exportListChk" data-am-label="pseudo" class="iDdList iLink" title="Export options"></label>
		<ul data-am-ddList class="iDdList iToolbar">
			<li data-am-item class="iDdList"><span class="iToolbar" data-am-label_i>Action </span>A</li>
			<li data-am-item class="iDdList"><span class="iToolbar" data-am-label_i>Action </span>B</li>
			<li data-am-item class="iDdList"><span class="iToolbar" data-am-label_i>Action </span>C</li>
			<li data-am-item="default" class="iDdList"><span class="iToolbar" data-am-label_i>Action </span>E</li>
		</ul>
	</li>
</ul>
            
          
!
            
              /********************************
CONTENTS
- styling base html
- size XL helper and modificator
- styling ico
- @class iLink
- @group hPointer iBtn iLink
- @class iBtn
- @group iBtn iDdList
- @class iDdList
- @class iToolbar
--- BEM examples of using cascade
*********************************/

/**** styling base html */
body {
	background-color: InfoBackground;
	
	margin:	1em;
	/*padding: 1em;*/ /* @todo correct my buggy toolbar! */
}
/* *[hidden] { display: none; } */
/* styling base html ****/

/**** size XL helper class/interface */
/* only 'helpers' classes/interfaces can use 'straight' rules (without attributes) 'h' - helper'*/
.hXL {
	font-size: x-large;
}
/* size XL helper class/interface ****/

/**** size XL modificator */
/* If you want to avoid inheritance for nested html-tags, you should use elements (css-attributes)! */
*[data-am-label ~= 'XL'],
i[data-am-ico ~= 'XL']:before {
	font-size: x-large;
}
/* size XL ****/

/**** ico */
*[data-am-ico]:before {
	margin-right: .3ex;
}

i[data-am-ico]:before {
	font-style: normal;
}

*[data-am-ico ~= 'star']:before,
*[data-am-ico ~= 'fav']:before {
	content: '\2606';
}

*[data-am-ico ~= 'export']:before {
	content: '\21E9';
}
/* ico ****/

/**** @class iLink */
.iLink[data-am-label] {
	color: 						Blue;
	text-decoration: 	none;
	white-space: 			nowrap;
	
	position: relative;
}

.iLink[data-am-label]:hover {
	color: DodgerBlue;
}

.iLink[data-am-label]:after {
	display: 		block;
	border-top: .1em solid;
	width: 			100%;
	
	content: 	'';
	position: absolute;
	bottom: 	.1em;
}

.iLink[data-am-label ~= 'pseudo']:after {
	border-top-style: dotted;
}
/* @class iLink ****/

/**** @group hPointer iLink iBtn */
.hPointer,
.iLink[data-am-label],
.iBtn[data-am-label] {
	cursor: pointer;
}
/* @group hPointer iLink iBtn ****/

/**** @class iBtn */
.iBtn[data-am-baseBtn] {
	display: none;
}

.iBtn[data-am-label] {
	background-color: ButtonFace;
	color: 						ButtonText;
	cursor: 					pointer;
	
	border: outset .1em;
}

.iBtn[data-am-label ~= 'submit'] {
	background-color: DodgerBlue;
	color: 						Window;
}

.iBtn[data-am-label ~= 'submit']:hover {
	background-color: Blue;
}
/* @class iBtn ****/

/**** @group iBtn iDdList */
.iBtn[data-am-label],
.iDdList[data-am-ddList] {
	padding: 5px;
}
/* @group iBtn iDdList ****/

/**** @class iDdList */
.iDdList[data-am-holder] {
	display: inline-block; /* On WinXP you can install IE8 ;) */
	
	position: relative;
}

.iDdList[data-am-label]:before {
	content: '\25BE';
}

.iDdList[data-am-isVisible]:checked ~ .iDdList[data-am-label]:before {
	content: '\25B4';
}

.iDdList[data-am-ddList] {
	background-color: Menu;
	color: 						MenuText;
	list-style: 			none;
	text-align: 			right;
	
	border: solid .1em;
	margin: .25em 0;
	width: 	9ex;
	
	position: absolute;
	right: 		0;
	top: 			1.8em;
	z-index: 	1;
}

.iDdList[data-am-item] {
	margin: 	0;
	padding: 	0;
}

.iDdList[data-am-isVisible] ~ .iDdList[data-am-ddList] {
	display: none;
}

.iDdList[data-am-isVisible]:checked ~ .iDdList[data-am-ddList] {
	display: inherit;
}

.iDdList[data-am-item *= 'default'] {
	font-weight: bolder;
}
/* @class iDdList ****/

/**** @class iToolbar */
.iToolbar[data-am-actionList] {
	display: inline;
	padding: .25em .5em;
}

.iToolbar[data-am-actionList],
.iToolbar[data-am-ddList] {
	background-color: WindowFrame;
	list-style: 			none;
	
	border: outset .1em;
}

.iToolbar[data-am-actionList ~= 'XL'] {
	border-width: .15em;
}

.iToolbar[data-am-ddList] {
	top: 1em;
}

.iToolbar[data-am-item] {	
	display: 			inline;
	margin-left: .25em;
	
	position: relative;
}

.iToolbar[data-am-item]:first-child {
	margin-left: 0;
}

/**** BEM examples of using cascade */
.iToolbar[data-am-actionList ~= 'XL'] .iToolbar[data-am-item] {
	font-size: x-large;
}

.iToolbar[data-am-actionList ~= 'hiddenLabels'] .iToolbar[data-am-ddList] {
	width: 1em;
}

.iToolbar[data-am-actionList ~= 'hiddenLabels'] .iToolbar[data-am-label_i] {
	display: none;
}
/* BEM examples of using cascade ****/
/* @class iToolbar ****/
            
          
!
            
              /********************************
iAM - Interface/block/namespace [css-class], Attribute/element [css-attr], Modificator/state [css-attr-value].

This pen is created to showperspicuity of BEM-methodology by AMCSS realization. Also it is a brilliant example has appeared as a result of the Yandex-issue: https://github.com/bem/bem-method/issues/455
*********************************/
            
          
!
999px
Loading ..................

Console