diff options
update doc and examples
7 files changed, 185 insertions, 113 deletions
| -rw-r--r-- | README.md | 4 | ||||
| -rw-r--r-- | dist/spectre.css | 7 | ||||
| -rw-r--r-- | dist/spectre.min.css | 1 | ||||
| -rw-r--r-- | index.html | 279 | ||||
| -rw-r--r-- | src/buttons.less | 4 | ||||
| -rw-r--r-- | src/menus.less | 1 | ||||
| -rw-r--r-- | src/typography.less | 2 |
@@ -1,9 +1,9 @@ # Spectre -Spectre is a lightweight and clean CSS framework for faster and extendable development. +Spectre is a lightweight and modern CSS framework for faster and extensible development. * lightweight and clean starting point for your project * flexbox and responsive layout friendly -* built in CSS components and utilities +* built in useful components and utilities Spectre is a side project based on years of CSS development work on a large web service project. Spectre only includes modern base CSS styles, layout system, CSS components and utilities, and it can be modified for your project with LESS compiler. diff --git a/dist/spectre.css b/dist/spectre.css index 08b0d96..e25f173 100644 --- a/dist/spectre.css +++ b/dist/spectre.css @@ -457,7 +457,7 @@ blockquote small { } ul, ol { - margin: 0 0 1rem; + margin: 0 0 1rem 1rem; } ul ul, ol ul, @@ -899,6 +899,10 @@ pre code { border-bottom-left-radius: 0; z-index: 99; } +.btn-group .btn:hover, +.btn-group .btn:focus { + z-index: 99; +} .btn-group.btn-group-block { display: -webkit-box; display: -webkit-flex; @@ -1466,7 +1470,6 @@ textarea.form-input { } .menu { display: block; - width: auto; text-align: left; margin: 0; padding: 1rem; diff --git a/dist/spectre.min.css b/dist/spectre.min.css new file mode 100644 index 0000000..528bad8 --- /dev/null +++ b/dist/spectre.min.css @@ -0,0 +1 @@ +/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}ul,ol{list-style:none;padding:0;margin:0}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}*{box-sizing:border-box}*:before,*:after{box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:transparent}body{color:#333;font-family:"Helvetica Neue","PingFang SC","Hiragino Sans GB","Microsoft YaHei",WenQuanYi Micro Hei,sans-serif;font-size:1.4rem;background-color:#fff}a{color:#5764c6;text-decoration:underline}a:hover,a:focus{color:#283176}.btn .icon,button .icon,.toast .icon,.menu .icon{margin-right:.2rem;font-size:1.3333em;line-height:.8em;vertical-align:-20%}h1,h2,h3,h4,h5,h6{font-weight:300;line-height:1.1;margin-top:2.5rem;margin-bottom:1.5rem;color:inherit}h1{font-size:5rem}h2{font-size:4rem}h3{font-size:3rem}h4{font-size:2.4rem}h5{font-size:2rem}h6{font-size:1.6rem}p{line-height:1.428571429;margin:0 0 1rem}p.lead{font-size:120%}blockquote{padding:1rem 2rem;border-left:.2rem solid #ddd;margin-left:0}blockquote p:last-child{margin-bottom:0}blockquote small{color:#b3b3b3}ul,ol{margin:0 0 1rem 1rem}ul ul,ol ul,ul ol,ol ol{margin-left:2rem}ul li,ol li{margin-top:1rem}ul{list-style:disc inside}ul ul{list-style-type:circle}ol{list-style:decimal inside}ol ol{list-style-type:lower-alpha}.highlight{padding:.2rem;line-height:1.6rem;border-radius:.2rem;background-color:#fff5b7}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-bold{font-weight:bold}.text-italic{font-style:italic}.text-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text-clip{white-space:nowrap;overflow:hidden;text-overflow:clip}.text-break{word-break:break-word;word-wrap:break-word;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto}pre{margin-top:1em;margin-bottom:1em;padding:1.5rem;border-left:.2rem solid #5764c6;line-height:1.8rem;background-color:#f9f9f9}code{padding:.2rem .4rem;margin:-0.2rem .1em 0 .1em;border-radius:.2rem;background-color:#efefef;font-size:.9em;line-height:1em;vertical-align:baseline;white-space:nowrap}pre code{margin-top:0;margin-bottom:0;border-left:0;background-color:transparent;line-height:1.8rem}.container{width:100%;margin-left:auto;margin-right:auto;padding-left:1rem;padding-right:1rem}@media screen and (min-width:961px){.grid-960{width:96rem;margin-left:auto;margin-right:auto}}@media screen and (min-width:481px){.grid-480{width:48rem;margin-left:auto;margin-right:auto}}.columns{display:block;margin-left:-1rem;margin-right:-1rem}.column{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;padding:1rem}.column.col-12,.column.col-11,.column.col-10,.column.col-9,.column.col-8,.column.col-7,.column.col-6,.column.col-5,.column.col-4,.column.col-3,.column.col-2,.column.col-1{-webkit-box-flex:0;-webkit-flex:none;-ms-flex:none;flex:none}@media screen and (min-width:841px){.columns{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.col-12{width:100%}.col-11{width:91.66666667%}.col-10{width:83.33333333%}.col-9{width:75%}.col-8{width:66.66666667%}.col-7{width:58.33333333%}.col-6{width:50%}.col-5{width:41.66666667%}.col-4{width:33.33333333%}.col-3{width:25%}.col-2{width:16.66666667%}.col-1{width:8.33333333%}}@media screen and (min-width:481px) and (max-width:840px){.columns{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.col-12{width:100%}.col-11,.col-10,.col-9,.col-8,.col-7,.col-6,.col-5,.col-4,.col-3,.col-2,.col-1{width:50%}}@media screen and (max-width:480px){.hide-xs{display:none !important}}@media screen and (max-width:600px){.hide-sm{display:none !important}}@media screen and (max-width:840px){.hide-md{display:none !important}}@media screen and (max-width:960px){.hide-lg{display:none !important}}@media screen and (max-width:1280px){.hide-xl{display:none !important}}.img-responsive{display:block;max-width:100%;height:auto}.table{width:100%}.table th,.table td{text-align:left;padding:1.5rem 1rem;border-bottom:.1rem solid #efefef}.table th{border-color:#c9c9c9}.table tr.selected{background-color:#f4f4f4}.btn{display:inline-block;height:3.2rem;padding:.7rem 1.5rem;border:.1rem solid #5764c6;background-color:transparent;border-radius:3px;color:#5764c6;font-size:1.4rem;line-height:1.6rem;text-align:center;text-decoration:none;vertical-align:middle;white-space:nowrap;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;outline:0}.btn:hover,.btn:focus{color:#fff;background-color:#5764c6}.btn:active,.btn.active{color:#fff;background-color:#4452c0}.btn.loading{color:transparent !important;position:relative;pointer-events:none}.btn.loading::after{border:2px solid #5764c6;border-right-color:transparent;border-top-color:transparent;border-radius:8px;content:"";position:absolute;left:50%;top:50%;margin-left:-8px;margin-top:-8px;display:block;width:16px;height:16px;-webkit-animation:loading 500ms infinite linear;animation:loading 500ms infinite linear}.btn[disabled],.btn .disabled{opacity:.5;cursor:default}.btn.btn-primary{color:#fff;border-color:#4452c0;background-color:#5764c6}.btn.btn-primary:hover,.btn.btn-primary:focus{color:#fff;border-color:#3b49af;background-color:#4452c0}.btn.btn-primary:active,.btn.btn-primary.active{color:#fff;border-color:#3b49af;background-color:#3b49af}.btn.btn-primary.loading::after{border-color:#fff;border-right-color:transparent;border-top-color:transparent}.btn.btn-link{color:#5764c6;border-color:transparent;background-color:transparent}.btn.btn-link:hover,.btn.btn-link:focus{color:#35419c}.btn.btn-link:active,.btn.btn-link.active{color:#283176}.btn.btn-sm{height:2.4rem;border-radius:2px;font-size:1.2rem;line-height:1.4rem;padding:.4rem 1rem}.btn.btn-lg{height:4.2rem;border-radius:4px;font-size:1.8rem;line-height:2rem;padding:1rem 1.8rem}.btn.btn-block{width:100%;display:block}.btn.btn-clear{width:1.4rem;height:1.4rem;padding:0;margin:.1rem -0.2rem .1rem .2rem;border:0;border-radius:.7rem;vertical-align:top;background-color:transparent;opacity:.35;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.btn.btn-clear:hover{opacity:.75}.btn.btn-clear::before,.btn.btn-clear::after{content:"";display:block;position:absolute;top:50%;left:50%;background-color:#333}.btn.btn-clear::before{width:1rem;height:.2rem;margin-left:-0.5rem;margin-top:-0.1rem}.btn.btn-clear::after{width:.2rem;height:1rem;margin-left:-0.1rem;margin-top:-0.5rem}.btn-group{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex}.btn-group .btn{-webkit-box-flex:1;-webkit-flex:1 0 auto;-ms-flex:1 0 auto;flex:1 0 auto}.btn-group .btn:first-child:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group .btn:not(:first-child):not(:last-child){margin-left:-0.1rem;border-radius:0;z-index:49}.btn-group .btn:last-child:not(:first-child){margin-left:-0.1rem;border-top-left-radius:0;border-bottom-left-radius:0;z-index:99}.btn-group .btn:hover,.btn-group .btn:focus{z-index:99}.btn-group.btn-group-block{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.form-group:not(:last-child){margin-bottom:1rem}@media screen and (min-width:841px){.form-horizontal{padding:1rem}.form-horizontal .form-group{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.form-horizontal .form-label{padding:.8rem .4rem}.form-horizontal .form-checkbox,.form-horizontal .form-radio{margin:.5rem 0}}@media screen and (max-width:840px){.form-horizontal .col-12,.form-horizontal .col-11,.form-horizontal .col-10,.form-horizontal .col-9,.form-horizontal .col-8,.form-horizontal .col-7,.form-horizontal .col-6,.form-horizontal .col-5,.form-horizontal .col-4,.form-horizontal .col-3,.form-horizontal .col-2,.form-horizontal .col-1{width:100%}}.form-input{position:relative;display:block;width:100%;max-width:100%;height:3.2rem;background-color:#fff;background-image:none;border:.1rem solid #c5c5c5;border-radius:.3rem;color:#333;font-size:1.4rem;line-height:1.6rem;padding:.7rem .8rem;-webkit-appearance:none;outline:0}.form-input:focus{border-color:#5764c6}.form-input[disabled]{opacity:.75;background-color:#eeeff2;pointer-events:none}.form-input.input-sm{height:2.4rem;border-radius:.2rem;font-size:1.2rem;line-height:1.4rem;padding:.4rem .6rem}.form-input.input-lg{height:4.2rem;border-radius:.4rem;font-size:1.6rem;line-height:2rem;padding:1rem 1.2rem}.form-input.input-inline{width:auto;display:inline-block}textarea.form-input{height:auto}.has-success .form-input,.form-input.is-success{border-color:#32b643}.has-danger .form-input,.form-input.is-danger{border-color:#e85600}.form-label{display:block;margin-bottom:.5rem;line-height:1.6rem}.form-select:not([multiple]){height:3.2rem;background-color:#fff;font-size:1.4rem;line-height:1.6rem;padding:.7rem .8rem;border:.1rem solid #c5c5c5;border-radius:.3rem;outline:0}.form-select:focus{border-color:#5764c6}.form-select.select-sm{height:2.4rem;border-radius:.2rem;font-size:1.2rem;line-height:1.4rem;padding:.4rem .6rem}.form-checkbox,.form-radio{line-height:1.8rem;padding:.3rem 1.8rem;cursor:pointer;display:inline-block;position:relative}.form-checkbox input,.form-radio input{font-size:1.4rem;line-height:2.4rem;vertical-align:top;border:.1rem solid #c5c5c5;display:inline-block;width:1.4rem;height:1.4rem;padding:0;position:absolute;top:.5rem;left:0;cursor:pointer;outline:0;-webkit-appearance:none}.form-checkbox input:hover,.form-radio input:hover{border-color:#9f9f9f}.form-checkbox input:checked,.form-radio input:checked{background-color:#5764c6;border-color:#5764c6}.form-checkbox input{border-radius:.2rem}.form-checkbox input:checked::after{width:.6rem;height:1rem;content:"";position:absolute;top:50%;left:50%;margin-top:-0.6rem;margin-left:-0.3rem;border:.2rem solid #fff;border-top-width:0;border-left-width:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.form-radio input{border-radius:.7rem}.form-radio input:checked::after{width:.4rem;height:.4rem;content:"";position:absolute;top:50%;left:50%;margin-top:-0.2rem;margin-left:-0.2rem;border-radius:.2rem;background-color:#fff}.form-switch{line-height:1.8rem;padding:.3rem 1.8rem .3rem 3.4rem;cursor:pointer;display:inline-block;position:relative}.form-switch input{line-height:2.4rem;vertical-align:top;border:.1rem solid #c5c5c5;background-color:#c5c5c5;display:inline-block;width:3rem;height:1.8rem;padding:0;border-radius:.9rem;position:absolute;top:.3rem;left:0;cursor:pointer;outline:0;-webkit-appearance:none}.form-switch input::after{content:"";display:block;width:1.6rem;height:1.6rem;border-radius:.8rem;position:absolute;top:0;left:0;background-color:#fff;-webkit-transition:left .15s ease;transition:left .15s ease}.form-switch input:checked{background-color:#5764c6;border-color:#5764c6}.form-switch input:checked::after{left:1.2rem;background-color:#fff}.input-group{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.input-group .input-group-addon{line-height:1.6rem;padding:.7rem .8rem;border:1px solid #c5c5c5;border-radius:.3rem;background-color:#efefef}.input-group .input-group-addon,.input-group .input-group-btn{-webkit-box-flex:1;-webkit-flex:1 0 auto;-ms-flex:1 0 auto;flex:1 0 auto}.input-group .form-input:first-child:not(:last-child),.input-group .input-group-addon:first-child:not(:last-child),.input-group .input-group-btn:first-child:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.input-group .form-input:not(:first-child):not(:last-child),.input-group .input-group-addon:not(:first-child):not(:last-child),.input-group .input-group-btn:not(:first-child):not(:last-child){margin-left:-0.1rem;border-radius:0;z-index:49}.input-group .form-input:last-child:not(:first-child),.input-group .input-group-addon:last-child:not(:first-child),.input-group .input-group-btn:last-child:not(:first-child){margin-left:-0.1rem;border-top-left-radius:0;border-bottom-left-radius:0;z-index:99}.avatar{display:inline-block;width:3.2rem;height:3.2rem;font-size:1.4rem;font-weight:300;line-height:1;border-radius:50%;vertical-align:middle;position:relative;overflow:hidden}.avatar::after{content:attr(data-initial);position:absolute;top:50%;left:50%;color:#fff;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.avatar.avatar-xs{width:1.6rem;height:1.6rem;font-size:.8rem}.avatar.avatar-sm{width:2.4rem;height:2.4rem;font-size:1rem}.avatar.avatar-lg{width:4.8rem;height:4.8rem;font-size:2rem}.avatar.avatar-xl{width:6.4rem;height:6.4rem;font-size:2.6rem}.avatar-container{display:inline-block;position:relative}.avatar-container .avatar-icon{width:46%;height:46%;padding:3%;background-color:#fff;position:absolute;right:-6%;bottom:-6%}.avatar-status::after{content:'';display:block;width:1rem;height:1rem;border-radius:50%;background-color:#32b643}.badge{position:relative;margin-right:2.4rem}.badge::after{content:attr(data-badge);color:#fff;font-size:1.2rem;text-align:center;line-height:1.4rem;background-color:#5764c6;display:block;width:2rem;height:2rem;padding:.3rem .1rem;border-radius:50%;position:absolute;top:-1rem;right:-2.4rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.card{display:block;text-align:left;margin:0;padding:0;border-radius:.3rem;background-color:#fff;z-index:999;box-shadow:0 .1rem .4rem rgba(0,0,0,0.3)}.card .card-header,.card .card-image,.card .card-body,.card .card-footer{padding:1.5rem 1.5rem 0 1.5rem}.card .card-header:last-child,.card .card-image:last-child,.card .card-body:last-child,.card .card-footer:last-child{padding-bottom:1.5rem}.card .card-image{padding-left:0;padding-right:0}.card .card-image:first-child{padding-top:0}.card .card-image:first-child img{border-top-left-radius:.3rem;border-top-right-radius:.3rem}.card .card-title{margin-top:0;margin-bottom:.5rem;font-size:1.6em;line-height:1}.card .card-meta{margin-top:0;margin-bottom:0;font-size:1em;color:#b3b3b3}.chip{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;padding:.3rem .6rem;border-radius:.3rem;font-size:1.2rem;vertical-align:middle;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;background-color:#efefef;border:1px solid #e2e2e2}.chip:hover,.chip:focus{background-color:#eaeaea}.chip .chip-name{margin-left:.4rem}.file-icon{display:inline-block;width:2.4rem;height:3.2rem;background-color:transparent;position:relative;border-width:0 0 2.2rem 1.4rem;border-style:solid;border-color:#c5c5c5;border-radius:.2rem;text-align:left;zoom:1}.file-icon::before,.file-icon::after{position:absolute;top:0;right:0;content:'';width:1rem;height:1rem;border:.5rem solid #c5c5c5;border-right-color:transparent;border-top-color:transparent;background-color:transparent;z-index:2}.file-icon::after{content:attr(data-type);border-color:rgba(255,255,255,0.5);border-bottom-left-radius:.2rem;color:#fff;font-size:1rem;text-indent:-1.6rem;line-height:3.6rem;z-index:3}.file-icon.file-icon-xs{width:1.2rem;height:1.6rem;border-width:0 0 1.2rem .8rem}.file-icon.file-icon-xs::before,.file-icon.file-icon-xs::after{width:.4rem;height:.4rem;border-width:.2rem}.file-icon.file-icon-xs::after{text-indent:-0.8rem;line-height:1.6rem;font-size:.8rem;border-radius:.1rem;content:'--'}.file-icon.file-icon-sm{width:1.8rem;height:2.4rem;border-width:0 0 1.6rem 1rem}.file-icon.file-icon-sm::before,.file-icon.file-icon-sm::after{width:.8rem;height:.8rem;border-width:.4rem}.file-icon.file-icon-sm::after{text-indent:-1.2rem;line-height:2.6rem;font-size:.8rem}.file-icon.file-icon-lg{width:3.6rem;height:4.8rem;border-width:0 0 3.4rem 2.2rem}.file-icon.file-icon-lg::before,.file-icon.file-icon-lg::after{width:1.4rem;height:1.4rem;border-width:.7rem}.file-icon.file-icon-lg::after{text-indent:-2.6rem;line-height:6.2rem;font-size:1.2rem}.file-icon.file-icon-xl{width:4.8rem;height:6.4rem;border-width:0 0 4.6rem 3rem;border-radius:.3rem}.file-icon.file-icon-xl::before,.file-icon.file-icon-xl::after{width:1.8rem;height:1.8rem;border-width:.9rem}.file-icon.file-icon-xl::after{text-indent:-3.4rem;line-height:8.8rem;font-size:1.4rem}.label{display:inline-block;padding:.2rem .4rem;font-size:.9em;line-height:1em;color:#666;background-color:#efefef;text-align:center;white-space:nowrap;vertical-align:baseline;margin:-0.2rem .1em 0 .1em;border-radius:.2rem}.label.label-primary{color:#fff;background-color:#5764c6}.label.label-success{color:#fff;background-color:#32b643}.label.label-info{color:#fff;background-color:#0193eb}.label.label-warning{color:#fff;background-color:#ffb700}.label.label-danger{color:#fff;background-color:#e85600}.menu{display:block;text-align:left;margin:0;padding:1rem;border-radius:.3rem;background-color:#fff;z-index:999;box-shadow:0 .1rem .4rem rgba(0,0,0,0.3)}.menu .menu-item{display:block;padding:.2rem 1rem;margin-top:0;border-radius:.3rem;color:#333;line-height:2.4rem;text-decoration:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.menu .menu-item a{display:block;margin:-0.2rem -1rem;padding:.2rem 1rem;border-radius:.3rem;color:inherit;text-decoration:none}.menu .menu-item a:hover,.menu .menu-item a:focus{background-color:#f4f4f4}.menu .menu-item a:active,.menu .menu-item a.active{background-color:#efefef}.menu .menu-header{display:block;padding:.2rem 1rem;margin-top:0;font-size:1.2rem;line-height:1.8rem;color:#ccc}.menu .menu-header .menu-header-text{display:inline-block;padding:0 .6rem;margin-left:-0.6rem;background-color:#fff;position:relative;z-index:99}.menu .menu-header:after{content:"";display:block;width:100%;height:.1rem;-webkit-transform:translateY(-1rem);transform:translateY(-1rem);border-bottom:.1rem solid #efefef}.menu .divider{display:block;border-bottom:.1rem solid #efefef;margin:.5rem}.modal{text-align:left;margin:0;padding:0;border-radius:.3rem;background-color:#fff;z-index:999;box-shadow:0 .1rem .4rem rgba(0,0,0,0.3);display:block;float:none;margin-left:auto;margin-right:auto}.modal .modal-header{padding:1.5rem;border-bottom:1px solid #efefef}.modal .modal-header .modal-title{margin:0}.modal .modal-body{position:relative;padding:1.5rem;max-height:50vh;overflow-y:auto}.modal .modal-footer{padding:1.5rem;text-align:right}@media screen and (min-width:640px){.modal{width:64rem}}.breadcrumb{list-style:none;margin:.5rem 0;padding:1.2rem}.breadcrumb li{display:inline-block;margin:0}.breadcrumb li a{text-decoration:none}.breadcrumb li:last-child,.breadcrumb li:last-child a{color:#666;pointer-events:none}.breadcrumb li:not(:last-child)::after{content:"/";padding:0 .4rem;color:#c5c5c5}.tab{display:block;list-style:none;margin:.5rem 0;border-bottom:.1rem solid #c5c5c5}.tab::after{content:"";display:table;clear:both}.tab::after{content:"";display:table;clear:both}.tab .tab-item{float:left;border-bottom:.1rem solid transparent;margin-bottom:-0.1rem}.tab .tab-item a{display:block;padding:.5rem 1.5rem;color:#333;text-decoration:none}.tab .tab-item:hover,.tab .tab-item:focus{border-bottom-color:#5764c6}.tab .tab-item:hover a,.tab .tab-item:focus a{color:#5764c6}.tab .tab-item.active{border-bottom-color:#3b49af}.tab .tab-item.active a{color:#3b49af}.tab.tab-block{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.tab.tab-block .tab-item{float:none;-webkit-box-flex:1;-webkit-flex:1 0 auto;-ms-flex:1 0 auto;flex:1 0 auto;text-align:center}.toast{display:block;width:100%;padding:1.4rem;color:#666;border:.1rem solid #eaeaea;border-radius:.3rem;background-color:#efefef}.toast.toast-primary{color:#fff;background-color:#5764c6;border-color:#4f5dc3}.toast.toast-success{color:#fff;background-color:#32b643;border-color:#30ae40}.toast.toast-info{color:#fff;background-color:#0193eb;border-color:#018de1}.toast.toast-warning{color:#fff;background-color:#ffb700;border-color:#f5b000}.toast.toast-danger{color:#fff;background-color:#e85600;border-color:#de5200}.tooltip{position:relative}.tooltip::after{content:attr(data-tooltip);display:block;max-width:32rem;padding:.6rem 1rem;border-radius:.3rem;background-color:rgba(51,51,51,0.9);opacity:0;color:#fff;font-size:1.2rem;line-height:1.6rem;text-overflow:ellipsis;position:absolute;bottom:100%;left:50%;-webkit-transform:translate(-50%,0);transform:translate(-50%,0);overflow:hidden;z-index:99;pointer-events:none;-webkit-transition:all .216s ease;transition:all .216s ease}.tooltip:hover::after,.tooltip:focus::after{opacity:1;-webkit-transform:translate(-50%,-0.5rem);transform:translate(-50%,-0.5rem)}.tooltip.tooltip-right::after{bottom:50%;left:100%;-webkit-transform:translate(0,50%);transform:translate(0,50%)}.tooltip.tooltip-right:hover::after,.tooltip.tooltip-right:focus::after{-webkit-transform:translate(0.5rem,50%);transform:translate(0.5rem,50%)}.tooltip.tooltip-bottom::after{top:100%;bottom:auto;-webkit-transform:translate(-50%,0);transform:translate(-50%,0)}.tooltip.tooltip-bottom:hover::after,.tooltip.tooltip-bottom:focus::after{-webkit-transform:translate(-50%,0.5rem);transform:translate(-50%,0.5rem)}.tooltip.tooltip-left::after{right:100%;bottom:50%;left:auto;-webkit-transform:translate(0,50%);transform:translate(0,50%)}.tooltip.tooltip-left:hover::after,.tooltip.tooltip-left:focus::after{-webkit-transform:translate(-0.5rem,50%);transform:translate(-0.5rem,50%)}.clearfix::after,.container::after,.columns::after{content:"";display:table;clear:both}.pull-left{float:left !important}.pull-right{float:right !important}.rel{position:relative}.abs{position:absolute}.fixed{position:fixed}.top{position:absolute;top:0}.right{position:absolute;right:0}.bottom{position:absolute;bottom:0}.left{position:absolute;left:0}.centered{display:block;float:none;margin-left:auto;margin-right:auto}.mt-10{margin-top:1rem}.mr-10{margin-right:1rem}.mb-10{margin-bottom:1rem}.ml-10{margin-left:1rem}.mt-5{margin-top:.5rem}.mr-5{margin-right:.5rem}.mb-5{margin-bottom:.5rem}.ml-5{margin-left:.5rem}.block{display:block}.inline{display:inline}.inline-block{display:inline-block}.flex{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.hide{display:none !important}.shadow{box-shadow:0 .1rem .4rem rgba(0,0,0,0.3)}.light-shadow{box-shadow:0 .1rem .2rem rgba(0,0,0,0.15)}.rounded{border-radius:.3rem}.circle{border-radius:50%}@-webkit-keyframes loading{0{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes loading{0{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}
\ No newline at end of file @@ -1,16 +1,17 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="UTF-8"> - <meta name="robots" content="index, follow"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"/> - <meta name="author" content="https://github.com/picturepan2/spectre"> - <title>Spectre, a lightweight and clean CSS framework for faster and extendable development.</title> - <link rel="stylesheet" href="dist/spectre.css"> - <link rel="stylesheet" href="demo/font/style.css"> + <meta charset="UTF-8" /> + <meta name="robots" content="index, follow" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <meta name="author" content="https://github.com/picturepan2/spectre" /> + <title>Spectre, a lightweight and modern CSS framework for faster and extensible development.</title> + <link rel="stylesheet" href="dist/spectre.css" /> + <link rel="stylesheet" href="demo/font/style.css" /> <style> header > h4 { - margin-top: 8rem; + padding-top: 4rem; + margin-top: 4rem; margin-bottom: 2rem; } .bg-grey { @@ -29,6 +30,9 @@ margin: 2rem 0; color: #666; } + .code { + color: #666; + } .code .com { color: #adadad; } @@ -36,7 +40,7 @@ color: #4452c0; } .code .atn { - color: #4452c0; + color: #666; } .code .atv { color: #e06870; @@ -48,10 +52,10 @@ <section id="overview" class="grid-hero grid-960"> <header class="text-center"><h3>Project Spectre</h3></header> <section> - <p><strong>Project Spectre</strong> is a lightweight and clean CSS framework for faster and extendable development.</p> + <p><strong>Project Spectre</strong> is a lightweight and modern CSS framework for faster and extensible development.</p> <ul> <li>lightweight and clean starting point for your project</li> - <li>flexbox and responsive layout friendly</li> + <li>flexbox, responsive and mobile-friendly layout</li> <li>built in useful components and utilities</li> </ul> </section> @@ -65,12 +69,45 @@ </section> <section class="container grid-960"> <section id="get-started"> - <!--<header class="text-center"><h4>get started</h4></header> + <header class="text-center"><h4>get started</h4></header> <section class="notes"> - <p>You can either manually install Spectre CSS framework to your website or app.</p> - <h5>Bower</h5> - <h5>NPM</h5> - </section>--> + <p>There are 3 ways to get started with Spectre CSS framework in your projects. You can either manually install or use NPM and Bower (comming soon).</p> + <p>Download the compiled and minified Spectre CSS file (less than 25KB), and include it in your website or Web app <code class="label"><head></code>:</p> + + <!-- get started example --> +<pre class="code lang-html"> +<<span class="tag">link</span> <span class="atn">rel</span>=<span class="atv">"stylesheet"</span> <span class="atn">href</span>=<span class="atv">"dist/spectre.css"</span> /> +</pre> + <p>You could even customize Spectre CSS with your own code and removing unneeded components. It requires a LESS compiler and Autoprefixer.</p> + + <!--<p>Install with NPM</p> + <p>Install with Bower</p>--> + + </section> + <section class="notes text-center"> + <h4>core elements</h4> + <div class="btn-group"> + <a href="#typography" class="btn btn-default">typography</a> + <a href="#layout" class="btn btn-default">layout</a> + <a href="#tables" class="btn btn-default">tables</a> + <a href="#buttons" class="btn btn-default">buttons</a> + <a href="#forms" class="btn btn-default">forms</a> + <a href="#images" class="btn btn-default">images</a> + </div> + <h4>components</h4> + <div class="btn-group"> + <a href="#avatars" class="btn btn-default">avatars</a> + <a href="#chips" class="btn btn-default">chips</a> + <a href="#tooltips" class="btn btn-default">tooltips</a> + <a href="#labels" class="btn btn-default">labels</a> + <a href="#badges" class="btn btn-default">badges</a> + <a href="#toasts" class="btn btn-default">toasts</a> + <a href="#menus" class="btn btn-default">menus</a> + <a href="#navigation" class="btn btn-default">navigation</a> + <a href="#modals" class="btn btn-default">modals</a> + <a href="#cards" class="btn btn-default">cards</a> + </div> + </section> </section> <section id="typography"> @@ -133,44 +170,43 @@ <header class="text-center"><h4>flexbox layout</h4></header> <section class="notes"> <p><strong>Layout</strong> includes flexbox based responsive grid system with 12 columns. </p> - <p>Add the class <code class="label">columns</code> to a container. And add any element you want with classname <code class="label">column</code> inside the container. These columns will take up the space equally. You can specific the width of each column by adding class <code class="label">col-[1-12]</code>.</p> </section> <div class="columns"> <div class="column"> - <div class="bg-grey">1</div> + <div class="bg-grey"></div> </div> <div class="column"> - <div class="bg-grey">2</div> + <div class="bg-grey"></div> </div> <div class="column"> - <div class="bg-grey">3</div> + <div class="bg-grey"></div> </div> <div class="column"> - <div class="bg-grey">4</div> + <div class="bg-grey"></div> </div> <div class="column"> - <div class="bg-grey">5</div> + <div class="bg-grey"></div> </div> <div class="column"> - <div class="bg-grey">6</div> + <div class="bg-grey"></div> </div> <div class="column"> - <div class="bg-grey">7</div> + <div class="bg-grey"></div> </div> <div class="column"> - <div class="bg-grey">8</div> + <div class="bg-grey"></div> </div> <div class="column"> - <div class="bg-grey">9</div> + <div class="bg-grey"></div> </div> <div class="column"> - <div class="bg-grey">10</div> + <div class="bg-grey"></div> </div> <div class="column"> - <div class="bg-grey">11</div> + <div class="bg-grey"></div> </div> <div class="column"> - <div class="bg-grey">12</div> + <div class="bg-grey"></div> </div> </div> <div class="columns"> @@ -201,6 +237,9 @@ <div class="bg-grey">col-2</div> </div> </div> + <section class="notes"> + <p>Add the class <code class="label">columns</code> to a container. And add any element you want with classname <code class="label">column</code> inside the container. These columns will take up the space equally. You can specific the width of each column by adding class <code class="label">col-[1-12]</code>.</p> + </section> <!-- layout example --> <pre class="code lang-html"> @@ -218,7 +257,6 @@ <header class="text-center"><h4>tables</h4></header> <section class="notes"> <p><strong>Tables</strong> include default styles for tables and data sets.</p> - <p>Add the class <code class="label">table</code> to any <table> element. The class will add padding, border and emphasized table header. Use the class <code class="label">selected</code> to make <tr> element highlighted. </p> </section> <table class="table"> @@ -257,6 +295,9 @@ </tr> </tbody> </table> + <section class="notes"> + <p>Add the class <code class="label">table</code> to any <table> element. The class will add padding, border and emphasized table header. Use the class <code class="label">selected</code> to make <tr> element highlighted. </p> + </section> <!-- tables example --> <pre class="code lang-html"> @@ -286,7 +327,6 @@ <header class="text-center"><h4>buttons</h4></header> <section class="notes"> <p><strong>Buttons</strong> include simple button styles for actions in different types and sizes. </p> - <p>Add the class <code class="label">btn</code> to <a>, <input> or <button> elements for a default button. There are classes <code class="label">btn-primary</code> and <code class="label">btn-link</code> for predefined primary and link buttons. A button with the class <code class="label">loading</code> can show loading indicator. </p> </section> <div class="columns"> @@ -303,6 +343,9 @@ <button class="btn btn-link loading">link button</button> </div> </div> + <section class="notes"> + <p>Add the class <code class="label">btn</code> to <a>, <input> or <button> elements for a default button. There are classes <code class="label">btn-primary</code> and <code class="label">btn-link</code> for predefined primary and link buttons. A button with the class <code class="label">loading</code> can show loading indicator. </p> + </section> <!-- buttons example --> <pre class="code lang-html"> @@ -315,9 +358,6 @@ </pre> <header class="text-center"><h5>button sizes</h5></header> - <section class="notes"> - <p>Add the class <code class="label">btn-sm</code> or <code class="label">btn-lg</code> for small or large button size. Also, you can add the class <code class="label">btn-block</code> for a full-width button. </p> - </section> <div class="columns"> <div class="column"> @@ -329,6 +369,9 @@ <button class="btn btn-block">block button</button> </div> </div> + <section class="notes"> + <p>Add the class <code class="label">btn-sm</code> or <code class="label">btn-lg</code> for small or large button size. Also, you can add the class <code class="label">btn-block</code> for a full-width button. </p> + </section> <!-- buttons example --> <pre class="code lang-html"> @@ -337,9 +380,6 @@ <<span class="tag">button</span> <span class="atn">class</span>=<span class="atv">"btn btn-block"</span>>block button<<span class="tag">/button</span>> </pre> - <section class="notes"> - <p>Icons with the class <code class="label">icon</code> can be correctly rendered in each button size. </p> - </section> <div class="columns"> <div class="column"> <button class="btn btn-primary btn-lg"><span class="icon icon-markunread"></span> large</button> @@ -347,6 +387,9 @@ <button class="btn btn-primary btn-sm"><span class="icon icon-markunread"></span> small</button> </div> </div> + <section class="notes"> + <p>Icons with the class <code class="label">icon</code> can be correctly rendered in each button size. </p> + </section> <!-- buttons example --> <pre class="code lang-html"> @@ -356,9 +399,6 @@ </pre> <header class="text-center"><h5>button groups</h5></header> - <section class="notes"> - <p>If you want to use buttons as a group, add the class <code class="label">btn-group</code> to the container. You can add the class <code class="label">btn-group-block</code> for a full-width button group.</p> - </section> <div class="columns"> <div class="column"> <div class="btn-group"> @@ -375,6 +415,9 @@ </div> </div> </div> + <section class="notes"> + <p>If you want to use buttons as a group, add the class <code class="label">btn-group</code> to the container. You can add the class <code class="label">btn-group-block</code> for a full-width button group.</p> + </section> <!-- button groups example --> <pre class="code lang-html"> @@ -391,7 +434,7 @@ <header class="text-center"><h4>forms</h4></header> <section class="notes"> <p><strong>Forms</strong> provide the most common control styles used in forms, including label, input, textarea, select, checkbox, radio and switch. </p> - <p> </p> + <p></p> </section> <div class="columns"> <div class="column col-6"> @@ -573,13 +616,22 @@ </div> </div> </div> + + <!-- input groups example --> +<pre class="code lang-html"> +<<span class="tag">div</span> <span class="atn">class</span>=<span class="atv">"input-group"</span>> + <<span class="tag">span</span> <span class="atn">class</span>=<span class="atv">"input-group-addon"</span>>slack.com/<<span class="tag">/span</span>> + <<span class="tag">input</span> <span class="atn">type</span>=<span class="atv">"text"</span> <span class="atn">class</span>=<span class="atv">"form-input"</span> <span class="atn">placeholder</span>=<span class="atv">"site name"</span> /> + <<span class="tag">button</span> <span class="atn">class</span>=<span class="atv">"btn btn-primary input-group-btn"</span>>Submit<<span class="tag">/button</span>> +<<span class="tag">/div</span>> +</pre> + </section> <section id="images"> <header class="text-center"><h4>images</h4></header> <section class="notes"> <p><strong>Images</strong> include responsive image class. </p> - <p>Add the class <code class="label">img-responsive</code> to <img> elements. The images will scale with the parent sizes.</p> </section> <div class="columns"> <div class="column col-6"> @@ -589,6 +641,9 @@ <img src="demo/img/osx-el-capitan-2.jpg" class="img-responsive rounded hide-sm" /> </div> </div> + <section class="notes"> + <p>Add the class <code class="label">img-responsive</code> to <img> elements. The images will scale with the parent sizes.</p> + </section> <!-- images example --> <pre class="code lang-html"> @@ -601,8 +656,6 @@ <header class="text-center"><h4>avatars</h4></header> <section class="notes"> <p><strong>Avatars</strong> are user profile pictures. </p> - <p>Add the class <code class="label">avatar</code> to <img> element. Avatars come in 5 sizes, including <code class="label">avatar-xl</code> (64px), <code class="label">avatar-lg</code> (48px), <code class="label">avatar-sm</code> (24px), and <code class="label">avatar-xs</code> (16px). By default, the avatar size is 32px.</p> - <p>For users who don't have profile pictures, you may use their initials for avatars. Add the class <code class="label">avatar</code> and avatar size class to <div> element. The attribute <code class="label">data-initial</code> is the name appear inside the avatar.</p> </section> <div class="columns"> <div class="column col-3"> @@ -643,6 +696,11 @@ </div> </div> + <section class="notes"> + <p>Add the class <code class="label">avatar</code> to <img> element. There are 4 additional sizes available, including <code class="label">avatar-xl</code> (64px), <code class="label">avatar-lg</code> (48px), <code class="label">avatar-sm</code> (24px), and <code class="label">avatar-xs</code> (16px). By default, the avatar size is 32px.</p> + <p>For users who don't have profile pictures, you may use their initials for avatars. Add the class <code class="label">avatar</code> and avatar size class to <div> element. The attribute <code class="label">data-initial</code> is the name appear inside the avatar.</p> + </section> + <!-- avatars example --> <pre class="code lang-html"> <<span class="tag">img</span> <span class="atn">src</span>=<span class="atv">"img/avatar-1.png"</span> <span class="atn">class</span>=<span class="atv">"avatar avatar-xl"</span> /> @@ -720,7 +778,6 @@ <header class="text-center"><h4>tooltips</h4></header> <section class="notes"> <p><strong>Tooltips</strong> provide context information labels that appear on hover and focus.</p> - <p>Add the class <code class="label">tooltip</code> and the attribute <code class="label">data-tooltip</code>, which contains the tooltip content, to non self closing elements. And add the class name <code class="label">tooltip-right</code>, <code class="label">tooltip-bottom</code> or <code class="label">tooltip-left</code> to define the position of a tooltip. By default, the tooltip appears above the element.</p> </section> <div class="columns"> <div class="column text-center"> @@ -736,6 +793,9 @@ <button class="btn btn-primary tooltip tooltip-left" data-tooltip="Lorem ipsum dolor sit amet">left tooltip</button> </div> </div> + <section class="notes"> + <p>Add the class <code class="label">tooltip</code> and the attribute <code class="label">data-tooltip</code>, which contains the tooltip content, to non self closing elements. And add the class name <code class="label">tooltip-right</code>, <code class="label">tooltip-bottom</code> or <code class="label">tooltip-left</code> to define the position of a tooltip. By default, the tooltip appears above the element.</p> + </section> <!-- tooltips example --> <pre class="code lang-html"> @@ -749,33 +809,70 @@ <header class="text-center"><h4>labels</h4></header> <section class="notes"> <p><strong>Labels</strong> are formatted text tags for highlighted, informative information.</p> - <p>Add the class <code class="label">label</code> to <span> or <small> elements. You can add another class <code class="label">label-primary</code>, <code class="label">label-success</code>, <code class="label">label-info</code>, <code class="label">label-warning</code>, <code class="label">label-danger</code> for more colored labels.</p> </section> <div class="columns"> <div class="column"> <span class="label">default label</span> - </div> - <div class="column"> + <span class="label label-primary">primary label</span> + + <span class="label label-success">success label</span> + + <span class="label label-info">info label</span> + + <span class="label label-warning">warning label</span> + + <span class="label label-danger">danger label</span> </div> + </div> + <section class="notes"> + <p>Add the class <code class="label">label</code> to <span> or <small> elements. You can add another class <code class="label">label-primary</code>, <code class="label">label-success</code>, <code class="label">label-info</code>, <code class="label">label-warning</code>, <code class="label">label-danger</code> for more colored labels.</p> + </section> + + <!-- labels example --> +<pre class="code lang-html"> +<<span class="tag">span</span> <span class="atn">class</span>=<span class="atv">"label"</span>>default label<<span class="tag">/span</span>> +<<span class="tag">span</span> <span class="atn">class</span>=<span class="atv">"label label-primary"</span>>primary label<<span class="tag">/span</span>> +</pre> + + </section> + + <section id="badges"> + <header class="text-center"><h4>badges</h4></header> + <section class="notes"> + <p><strong>Badges</strong> are often used as unread number indicators.</p> + </section> + <div class="columns"> <div class="column"> - <span class="label label-success">success label</span> + <span class="badge" data-badge="1"> + Notifications + </span> </div> <div class="column"> - <span class="label label-info">info label</span> + <span class="badge" data-badge="99"> + Notifications + </span> </div> <div class="column"> - <span class="label label-warning">warning label</span> + <span class="badge" data-badge="999"> + Notifications + </span> </div> <div class="column"> - <span class="label label-danger">danger label</span> + <span class="badge" data-badge="♀"> + Notifications + </span> </div> </div> + <section class="notes"> + <p>Add the class <code class="label">badge</code> to non self closing elements. And add the attribute <code class="label">data-badge</code> to define the content of a badge. The badge will appear in the top-right direction of the element.</p> + </section> - <!-- labels example --> + <!-- badges example --> <pre class="code lang-html"> -<<span class="tag">span</span> <span class="atn">class</span>=<span class="atv">"label"</span>>default label<<span class="tag">/span</span>> -<<span class="tag">span</span> <span class="atn">class</span>=<span class="atv">"label label-primary"</span>>primary label<<span class="tag">/span</span>> +<<span class="tag">span</span> <span class="atn">class</span>=<span class="atv">"badge"</span> <span class="atn">data-badge</span>=<span class="atv">"99"</span>> + Notifications +<<span class="tag">/span</span>> </pre> </section> @@ -784,7 +881,6 @@ <header class="text-center"><h4>toasts</h4></header> <section class="notes"> <p><strong>Toasts</strong> are used to show alert or information to users.</p> - <p>Add a container element with the class <code class="label">toast</code>. You can add any text within the container, and even icons. You may also add a close button with the class <code class="label">btn-clear</code> if you need. </p> </section> <div class="columns"> <div class="column"> @@ -800,9 +896,6 @@ </div> </div> </div> - <section class="notes"> - <p>You can add the class <code class="label">toast-primary</code>, <code class="label">toast-success</code>, <code class="label">toast-info</code>, <code class="label">toast-warning</code>, <code class="label">toast-danger</code> for more colors.</p> - </section> <div class="columns"> <div class="column"> <div class="toast toast-success"> @@ -816,6 +909,8 @@ Efficiently unleash cross-media information without cross-media value. </div> </div> + </div> + <div class="columns"> <div class="column"> <div class="toast toast-warning"> <button class="btn btn-clear pull-right"></button> @@ -829,6 +924,10 @@ </div> </div> </div> + <section class="notes"> + <p>Add a container element with the class <code class="label">toast</code>. You can add any text within the container, and even icons. You may also add a close button with the class <code class="label">btn-clear</code> if you need. </p> + <p>You can add the class <code class="label">toast-primary</code>, <code class="label">toast-success</code>, <code class="label">toast-info</code>, <code class="label">toast-warning</code>, <code class="label">toast-danger</code> for more colors.</p> + </section> <!-- toasts example --> <pre class="code lang-html"> @@ -850,7 +949,6 @@ <header class="text-center"><h4>menus</h4></header> <section class="notes"> <p>A <strong>menu</strong> is a vertical list of links or buttons for actions and navigation.</p> - <p>Add a container element with the class <code class="label">menu</code>. And add child elements with the classname <code class="label">menu-item</code>. That is a basic menu component.</p> </section> <div class="columns"> <div class="column col-3"> @@ -918,6 +1016,9 @@ </ul> </div> </div> + <section class="notes"> + <p>Add a container element with the class <code class="label">menu</code>. And add child elements with the classname <code class="label">menu-item</code>. That is a basic menu component.</p> + </section> <!-- menus example --> <pre class="code lang-html"> @@ -934,12 +1035,12 @@ <<span class="tag">/li</span>> <<span class="tag">li</span> <span class="atn">class</span>=<span class="atv">"menu-item"</span>> <<span class="tag">a</span> <span class="atn">href</span>=<span class="atv">"#"</span>> - <<span class="tag">span</span> <span class="atn">class</span>=<span class="atv">"icon icon-link"</span>><<span class="tag">/span</span>> HIpchat + <<span class="tag">span</span> <span class="atn">class</span>=<span class="atv">"icon icon-link"</span>><<span class="tag">/span</span>> Hipchat <<span class="tag">/a</span>> <<span class="tag">/li</span>> <<span class="tag">li</span> <span class="atn">class</span>=<span class="atv">"menu-item"</span>> <<span class="tag">a</span> <span class="atn">href</span>=<span class="atv">"#"</span>> - <<span class="tag">span</span> <span class="atn">class</span>=<span class="atv">"icon icon-link"</span>><<span class="tag">/span</span>> skype + <<span class="tag">span</span> <span class="atn">class</span>=<span class="atv">"icon icon-link"</span>><<span class="tag">/span</span>> Skype <<span class="tag">/a</span>> <<span class="tag">/li</span>> <<span class="tag">/ul</span>> @@ -953,9 +1054,6 @@ <p><strong>Navigation</strong> includes several components, including breadcrumbs and tabs.</p> </section> <header class="text-center"><h5>breadcrumbs</h5></header> - <section class="notes"> - <p>Add a container element with the class <code class="label">breadcrumb</code>. And add child elements with the classname <code class="label">breadcrumb-item</code>.</p> - </section> <div class="columns"> <div class="column"> <ul class="breadcrumb"> @@ -977,6 +1075,9 @@ </ul> </div> </div> + <section class="notes"> + <p>Add a container element with the class <code class="label">breadcrumb</code>. And add child elements with the classname <code class="label">breadcrumb-item</code>.</p> + </section> <!-- breadcrumbs example --> <pre class="code lang-html"> @@ -1000,9 +1101,6 @@ </pre> <header class="text-center"><h5>tabs</h5></header> - <section class="notes"> - <p>Add a container element with the class <code class="label">tab</code>. And add child elements with the classname <code class="label">tab-item</code>. You can add the class <code class="label">tab-block</code> for a full-width tab.</p> - </section> <div class="columns"> <div class="column"> <ul class="tab"> @@ -1053,6 +1151,9 @@ </ul> </div> </div> + <section class="notes"> + <p>Add a container element with the class <code class="label">tab</code>. And add child elements with the classname <code class="label">tab-item</code>. You can add the class <code class="label">tab-block</code> for a full-width tab.</p> + </section> <!-- tabs example --> <pre class="code lang-html"> @@ -1082,44 +1183,6 @@ </section> - <section id="badges"> - <header class="text-center"><h4>badges</h4></header> - <section class="notes"> - <p><strong>Badges</strong> are often used as unread number indicators.</p> - <p>Add the class <code class="label">badge</code> to non self closing elements. And add the attribute <code class="label">data-badge</code> to define the content of a badge. The badge will appear in the top-right direction of the element.</p> - </section> - <div class="columns"> - <div class="column"> - <span class="badge" data-badge="1"> - Notifications - </span> - </div> - <div class="column"> - <span class="badge" data-badge="99"> - Notifications - </span> - </div> - <div class="column"> - <span class="badge" data-badge="999"> - Notifications - </span> - </div> - <div class="column"> - <span class="badge" data-badge="♀"> - Notifications - </span> - </div> - </div> - - <!-- badges example --> -<pre class="code lang-html"> -<<span class="tag">span</span> <span class="atn">class</span>=<span class="atv">"badge"</span> <span class="atn">data-badge</span>=<span class="atv">"99"</span>> - Notifications -<<span class="tag">/span</span>> -</pre> - - </section> - <section id="modals"> <header class="text-center"><h4>modals</h4></header> <section class="notes"> @@ -1196,7 +1259,6 @@ <header class="text-center"><h4>cards</h4></header> <section class="notes"> <p><strong>Cards</strong> are flexible content containers.</p> - <p>Add a container element with the class <code class="label">card</code>. And add child elements with the class name <code class="label">card-image</code>, <code class="label">card-header</code>, <code class="label">card-content</code> and/or <code class="label">card-footer</code> in any order. </p> </section> <div class="columns"> <div class="column col-4"> @@ -1252,6 +1314,9 @@ </div> </div> </div> + <section class="notes"> + <p>Add a container element with the class <code class="label">card</code>. And add child elements with the class name <code class="label">card-image</code>, <code class="label">card-header</code>, <code class="label">card-content</code> and/or <code class="label">card-footer</code> in any order. </p> + </section> <!-- cards example --> <pre class="code lang-html"> diff --git a/src/buttons.less b/src/buttons.less index 29c8e18..39618ff 100644 --- a/src/buttons.less +++ b/src/buttons.less @@ -189,6 +189,10 @@ border-bottom-left-radius: 0; z-index: 99; } + &:hover, + &:focus { + z-index: 99; + } } &.btn-group-block { diff --git a/src/menus.less b/src/menus.less index 7b148c9..70843eb 100644 --- a/src/menus.less +++ b/src/menus.less @@ -1,7 +1,6 @@ // Menus .menu { display: block; - width: auto; text-align: left; margin: 0; padding: 1rem; diff --git a/src/typography.less b/src/typography.less index 817e973..b18fa43 100644 --- a/src/typography.less +++ b/src/typography.less @@ -52,7 +52,7 @@ blockquote { } ul, ol { - margin: 0 0 1rem; + margin: 0 0 1rem 1rem; ul, ol { |