CSS - Helpers (helpers.css): Unterschied zwischen den Versionen

Aus Wikizone
Wechseln zu: Navigation, Suche
Zeile 1: Zeile 1:
 +
== helpers.css ==
 +
 +
 
<syntaxhighlight lang="css">
 
<syntaxhighlight lang="css">
 
/*
 
/*
Zeile 351: Zeile 354:
  
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
== Weitere CSS Tools ==
 +
=== Shadows ===
 +
Simple
 +
 +
.box-shadow{
 +
  box-shadow: 0px 0px 18px 2px rgba(0, 0, 0, 0.28);
 +
  -webkit-box-shadow: 0px 0px 18px 2px rgba(0, 0, 0, 0.28);
 +
  -moz-box-shadow: 0px 0px 18px 2px rgba(0, 0, 0, 0.28);
 +
}
 +
 +
Material Design inspired
 +
 +
Todo
 +
 +
.shadow-1
 +
.shadow-2
 +
...

Version vom 13. Dezember 2017, 15:41 Uhr

helpers.css

/*
 * helpers.css
 * Version: 1.1.1 (2017)
 * by Stephan Schlegel
 * provides useful classes for common purposes
 */
a:active, a:focus {outline: none;}
.nowrap, .no-wrap{
  white-space: nowrap;
}
.no-opacity {
    opacity: 0;
}
.no-padding {
	padding: 0 !important;
}
.no-v-padding {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}
.no-h-padding {
	padding-left: 0 !important;
	padding-right: 0 !important;
}
.no-margin {
	margin: 0 !important;
}
.no-h-margin {
	margin-left: 0 !important;
	margin-right: 0 !important;
}
.no-v-margin {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}
/* no gutter grid for bootstrap and some others */
.container.no-gutter{
  padding-right: 0;
  padding-left: 0;
}
.container.no-gutter row{
  margin: 0;
}
.container.no-gutter row > div,
.container.no-gutter .col{
  padding-left: 0;
  padding-right: 0;
  margin: 0;
}
.text-left, .align-left {
  text-align: left;
}
.text-right, .align-right {
  text-align: right;
}
.text-center, .align-center {
  text-align: center;
}
.text-justify, .align-justify {
  text-align: justify;
}
.text-nowrap {
  white-space: nowrap;
}
.text-lowercase, .lowercase {
  text-transform: lowercase;
}
.text-uppercase, .uppercase {
  text-transform: uppercase;
}
.text-capitalize, .capitals {
  text-transform: capitalize;
}
.invisible {
  visibility: hidden;
}
.text-hide {
  font: 0/0 a;
  color: transparent;
  text-shadow: none;
  background-color: transparent;
  border: 0;
}
.hidden, .hide {
  display: none !important;
}
.show {
  display: block !important;
}
.affix {
  position: fixed;
}
/* usful TABLE Defaults */
.table{
  display:table;
  background-color: transparent;
  vertical-align: top;
  height: 100%;
  width: 100%;
}
.table .table {
    background-color: transparent;
}
.table-row{display: table-row;}
.table-cell{
  display: table-cell;
  vertical-align: top;
  height: 100%;
  width: 100%;
}

.bg-image{
	background-repeat: no-repeat;
	background-size:cover;
  background-position: 50% 50%;
}
.scroller{
  overflow-y: auto;
}

/* stretch to the limite (vertical - horicontal *
 * parent needs pos relative or absolute to work
 * in some cases you need to add bottom: 0
 */
.stretch{
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.stretch-border{ /* user if you need a border around inner box */
  /* width: 100%; */
  /*position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  right: 4px;*/
}
.full-width{
  width: 100%;
  margin: 0;
  padding: 0;
}
.small {
  font-size: 75%;
}

/* new clearfix */
.clearfix:after,
.stopFloat:after {
	visibility: hidden;
	display: block;
	font-size: 0;
	content: " ";
	clear: both;
	height: 0;
	}
* html .clearfix, * html .stopFloat{ zoom: 1; } /* IE6 */
*:first-child+html .clearfix, *:first-child+html .stopFloat { zoom: 1; } /* IE7 */

:focus {
  outline: 0;
}

body #bd,
body .bd{
  /* hyphens only in main body section */
  -moz-hyphens: auto;
  -o-hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
}

/* Navigation Helpers */
.nav ul{
  list-style-type: none;
  padding-left: 0;
}
.nav-v ul ul{
  padding-left: 1.5em;
}
.nav-h li{
  display: inline-block;
  padding: 0.5em 1em;
}
.nav-h li:nth-child(1){padding-left: 0;}

/*** Useful Bootstrap Helpers ***/
.fade {
  opacity: 0;
  -webkit-transition: opacity .15s linear;
       -o-transition: opacity .15s linear;
          transition: opacity .15s linear;
}
.fade.in {
  opacity: 1;
}
.collapse {
  display: none;
}
.collapse.in {
  display: block;
}
tr.collapse.in {
  display: table-row;
}
tbody.collapse.in {
  display: table-row-group;
}
.collapsing {
  position: relative;
  height: 0;
  overflow: hidden;
  -webkit-transition-timing-function: ease;
       -o-transition-timing-function: ease;
          transition-timing-function: ease;
  -webkit-transition-duration: .35s;
       -o-transition-duration: .35s;
          transition-duration: .35s;
  -webkit-transition-property: height, visibility;
       -o-transition-property: height, visibility;
          transition-property: height, visibility;
}
.caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 2px;
  vertical-align: middle;
  border-top: 4px dashed;
  border-top: 4px solid \9;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
}
/*
 * helpers.css
 * Version: 1.0.0 (2017)
 * by Stephan Schlegel
 * provides useful classes for common purposes
 */
a:active, a:focus {outline: none;}
.nowrap{
  white-space: nowrap;
}
.no-opacity {
    opacity: 0;
}
.no-padding {
	padding: 0 !important;
}
.no-v-padding {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}
.no-h-padding {
	padding-left: 0 !important;
	padding-right: 0 !important;
}
.no-margin {
	margin: 0 !important;
}
.no-h-margin {
	margin-left: 0 !important;
	margin-right: 0 !important;
}
.no-v-margin {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}
.table{
  display:table;
  background-color: transparent;
  /* vertical-align: bottom; */
  height: 100%;
  width: 100%;
}
.table .table {
    background-color: transparent;
}
.table-row{display: table-row;}
.table-cell{
  display: table-cell;
  vertical-align: top;
  height: 100%;
  width: 100%;
}
.bg-image{
	background-repeat: no-repeat;
	background-size:cover;
  background-position: 50% 50%;
}
.scroller{
  overflow-y: auto;
}
.stretch{ /*needs pos relative or absolute to work*/
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}
.stretch-border{ /* user if you need a border around inner box */
  /* width: 100%; */
  /*position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  right: 4px;*/
}
/* new clearfix */
.clearfix:after,
.stopFloat:after {
	visibility: hidden;
	display: block;
	font-size: 0;
	content: " ";
	clear: both;
	height: 0;
	}
* html .clearfix, * html .stopFloat             { zoom: 1; } /* IE6 */
*:first-child+html .clearfix, *:first-child+html .stopFloat { zoom: 1; } /* IE7 */

:focus {
  outline: 0;
}

body #bd,
body .bd{
  /* hyphens */
  /* padding: 4px; */
  -moz-hyphens: auto;
  -o-hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
}

/* Navigation Helpers */
.nav ul{list-style-type: none;}
.nav-h li{
  display: inline-block;
  padding: 6px 13px 6px 0;
}

Weitere CSS Tools

Shadows

Simple

.box-shadow{

 box-shadow: 0px 0px 18px 2px rgba(0, 0, 0, 0.28);
 -webkit-box-shadow: 0px 0px 18px 2px rgba(0, 0, 0, 0.28);
 -moz-box-shadow: 0px 0px 18px 2px rgba(0, 0, 0, 0.28);

}

Material Design inspired

Todo

.shadow-1
.shadow-2
...