mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2025-03-25 04:14:21 +03:00
Simplify project structure, remove cruft, remove tests copied from bootstrap so we can start our own.
This commit is contained in:
parent
0706a677f0
commit
09be69024e
16
.gitattributes
vendored
16
.gitattributes
vendored
|
@ -1,16 +0,0 @@
|
||||||
# Enforce Unix newlines
|
|
||||||
*.css text eol=lf
|
|
||||||
*.html text eol=lf
|
|
||||||
*.js text eol=lf
|
|
||||||
*.json text eol=lf
|
|
||||||
*.md text eol=lf
|
|
||||||
*.py text eol=lf
|
|
||||||
*.rb text eol=lf
|
|
||||||
*.scss text eol=lf
|
|
||||||
*.svg text eol=lf
|
|
||||||
*.yml text eol=lf
|
|
||||||
# Don't diff or textually merge source maps
|
|
||||||
*.map binary
|
|
||||||
|
|
||||||
bootstrap-material-design.css linguist-vendored=false
|
|
||||||
bootstrap-material-design.js linguist-vendored=false
|
|
18
.npmignore
18
.npmignore
|
@ -1,18 +0,0 @@
|
||||||
demo\
|
|
||||||
fonts\
|
|
||||||
meteor\
|
|
||||||
scripts\
|
|
||||||
test\
|
|
||||||
|
|
||||||
.editorconfig
|
|
||||||
.gitignore
|
|
||||||
.jshintrc
|
|
||||||
.npmignore
|
|
||||||
.travis.yml
|
|
||||||
.versions
|
|
||||||
bootstrap-elements.html
|
|
||||||
bower.json
|
|
||||||
CONTRIBUTING.md
|
|
||||||
Gruntfile.js
|
|
||||||
index.html
|
|
||||||
package.js
|
|
|
@ -117,6 +117,8 @@ linters:
|
||||||
"flex-shrink",
|
"flex-shrink",
|
||||||
"flex-grow",
|
"flex-grow",
|
||||||
"justify-content",
|
"justify-content",
|
||||||
|
"align-items",
|
||||||
|
"align-self",
|
||||||
"float",
|
"float",
|
||||||
"width",
|
"width",
|
||||||
"min-width",
|
"min-width",
|
||||||
|
@ -124,8 +126,6 @@ linters:
|
||||||
"height",
|
"height",
|
||||||
"min-height",
|
"min-height",
|
||||||
"max-height",
|
"max-height",
|
||||||
"align-items",
|
|
||||||
"align-self",
|
|
||||||
"padding",
|
"padding",
|
||||||
"padding-top",
|
"padding-top",
|
||||||
"padding-right",
|
"padding-right",
|
||||||
|
|
67
.travis.yml
67
.travis.yml
|
@ -1,51 +1,30 @@
|
||||||
branches:
|
sudo: false
|
||||||
except:
|
|
||||||
- v4-dist
|
|
||||||
# remove the following later:
|
|
||||||
- v4-dev
|
|
||||||
- v4-gulp
|
|
||||||
|
|
||||||
sudo: false # use the container infrastructure
|
|
||||||
language: node_js
|
|
||||||
git:
|
git:
|
||||||
depth: 10
|
depth: 10
|
||||||
|
|
||||||
|
# remove the dist branch and dist tags from travis builds
|
||||||
|
branches:
|
||||||
|
except:
|
||||||
|
- dist
|
||||||
|
- /^v(\d+\.)?(\d+\.)?(\*|\d+)$/
|
||||||
|
|
||||||
|
language: node_js
|
||||||
node_js:
|
node_js:
|
||||||
- "5"
|
- "5" # "node" (v6.x) yielded v8::ObjectTemplate::Set() with non-primitive values is deprecated
|
||||||
|
|
||||||
|
# enable this once we have reliable builds
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- node_modules
|
||||||
|
- vendor/bundle
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
# Remove ./node_modules/.bin from PATH so node-which doesn't replace Unix which and cause RVM to barf. See https://github.com/travis-ci/travis-ci/issues/5092
|
- rvm install 2.2
|
||||||
- export PATH=$(python -c 'from sys import argv;from collections import OrderedDict as od;print(":".join(od((p,None) for p in argv[1].split(":") if p.startswith("/")).keys()))' "$PATH")
|
- rvm use 2.2 --fuzzy
|
||||||
|
- gem install scss-lint
|
||||||
|
|
||||||
- rvm install 2.2.2
|
|
||||||
- rvm use 2.2.2 --fuzzy
|
|
||||||
- npm install -g npm
|
|
||||||
- "export TRAVIS_COMMIT_MSG=\"$(git log --format=%B --no-merges -n 1)\""
|
|
||||||
- echo "$TRAVIS_COMMIT_MSG" | grep '\[skip validator\]'; export BMD_DO_VALIDATOR=$?; true
|
|
||||||
- echo "$TRAVIS_COMMIT_MSG" | grep '\[skip sauce\]'; export BMD_DO_SAUCE=$?; true
|
|
||||||
# - if [ "$TRAVIS_REPO_SLUG" = twbs-savage/bootstrap ]; then export BMD_DO_VALIDATOR=0; fi
|
|
||||||
|
|
||||||
install:
|
before_script:
|
||||||
- bundle install --deployment --jobs=3
|
- npm install -g gulpjs/gulp-cli#4.0
|
||||||
- cp grunt/npm-shrinkwrap.json ./
|
|
||||||
- npm install -g grunt-cli
|
|
||||||
- npm install -g bower
|
|
||||||
- bower install
|
|
||||||
|
|
||||||
addons:
|
script: gulp all
|
||||||
sauce_connect:
|
|
||||||
username: "bmaterialdesign"
|
|
||||||
access_key:
|
|
||||||
secure: "eFSRVOJsJFi8Yhh0pCQpuJELDk0/B6s5tfvR3hi8oWXmW7FjNvRMgesoBKXbEW2HBhjJFMpt+1Rf49pweqgtZQ9vfz0GD47OjwJCTzip2Wv+EANLTJESdI5E0kw7STxrjL3Y12MBQQFHUYh9mhLdpAobNIppsIB5CG4pjtFSiG0="
|
|
||||||
|
|
||||||
env:
|
|
||||||
matrix:
|
|
||||||
- BMD_TEST=core
|
|
||||||
- BMD_TEST=validate-html
|
|
||||||
- BMD_TEST=sauce-js-unit
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
fast_finish: true
|
|
||||||
exclude:
|
|
||||||
- node_js: "4"
|
|
||||||
env: BMD_TEST=validate-html
|
|
||||||
- node_js: "4"
|
|
||||||
env: BMD_TEST=sauce-js-unit
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ import Clipboard from 'clipboard'
|
||||||
import anchors from 'anchor-js'
|
import anchors from 'anchor-js'
|
||||||
|
|
||||||
// import all the bmd code
|
// import all the bmd code
|
||||||
import '../../../../js/src/index' // eslint-disable-line no-unused-vars
|
import '../../../../js/index' // eslint-disable-line no-unused-vars
|
||||||
|
|
||||||
class Application {
|
class Application {
|
||||||
|
|
||||||
|
|
101
docs/examples/dashboard/template.html
Normal file
101
docs/examples/dashboard/template.html
Normal file
|
@ -0,0 +1,101 @@
|
||||||
|
---
|
||||||
|
layout: example
|
||||||
|
title: Dashboard Template
|
||||||
|
group: material-design
|
||||||
|
js: example.js
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- Custom styles for this template -->
|
||||||
|
<link href="example.css" rel="stylesheet">
|
||||||
|
|
||||||
|
<div class="bmd-layout-container bmd-drawer-f-l bmd-drawer-overlay-md-down bmd-drawer-in-lg-up">
|
||||||
|
<header class="bmd-layout-header">
|
||||||
|
<div class="navbar navbar-light bg-faded">
|
||||||
|
<button class="navbar-toggler hidden-lg-up" type="button" data-toggle="drawer" data-target="#my-drawer">
|
||||||
|
<span class="sr-only">Toggle drawer</span>
|
||||||
|
<i class="material-icons">menu</i>
|
||||||
|
</button>
|
||||||
|
<ul class="nav navbar-nav">
|
||||||
|
<li class="nav-item">
|
||||||
|
Home
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul class="nav navbar-nav pull-xs-right">
|
||||||
|
<li class="nav-item">
|
||||||
|
<div class="bmd-form-group bmd-collapse-inline pull-xs-right">
|
||||||
|
<button class="btn bmd-btn-icon" for="search" data-toggle="collapse" data-target="#collapse-search" aria-controls="collapse-search">
|
||||||
|
<i class="material-icons">search</i>
|
||||||
|
</button>
|
||||||
|
<span id="collapse-search" class="collapse">
|
||||||
|
<input class="form-control" type="text" id="search" placeholder="Enter your query...">
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<div class="dropdown">
|
||||||
|
<button class="btn bmd-btn-icon btn-secondary dropdown-toggle" type="button" id="more-menu" data-toggle="dropdown" aria-haspopup="true" >
|
||||||
|
<i class="material-icons">more_vert</i>
|
||||||
|
</button>
|
||||||
|
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="more-menu">
|
||||||
|
<button class="dropdown-item" type="button">About</button>
|
||||||
|
<button class="dropdown-item" type="button">Contact</button>
|
||||||
|
<button class="dropdown-item" type="button">Legal information</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div id="my-drawer" class="bmd-layout-drawer">
|
||||||
|
<header>
|
||||||
|
<img src="images/user.jpg" class="avatar">
|
||||||
|
<div class="account">
|
||||||
|
<span>hello@example.com</span>
|
||||||
|
<div class="dropdown">
|
||||||
|
<button class="btn bmd-btn-icon dropdown-toggle" type="button" id="nav-account-menu" data-toggle="dropdown" aria-haspopup="true">
|
||||||
|
<i class="material-icons">arrow_drop_down</i>
|
||||||
|
</button>
|
||||||
|
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="nav-account-menu">
|
||||||
|
<a class="dropdown-item">hello@example.com</a>
|
||||||
|
<a class="dropdown-item">info@example.com</a>
|
||||||
|
<a class="dropdown-item"><i class="material-icons">add</i>Add account...</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<ul class="list-group">
|
||||||
|
<a class="list-group-item">
|
||||||
|
<i class="material-icons" role="presentation">home</i>Home
|
||||||
|
</a>
|
||||||
|
<a class="list-group-item">
|
||||||
|
<i class="material-icons" role="presentation">inbox</i>Inbox
|
||||||
|
</a>
|
||||||
|
<a class="list-group-item">
|
||||||
|
<i class="material-icons" role="presentation">forum</i>Forums
|
||||||
|
</a>
|
||||||
|
<a class="list-group-item">
|
||||||
|
<i class="material-icons" role="presentation">flag</i>Updates
|
||||||
|
</a>
|
||||||
|
<a class="list-group-item">
|
||||||
|
<i class="material-icons" role="presentation">local_offer</i>Promos
|
||||||
|
</a>
|
||||||
|
<a class="list-group-item">
|
||||||
|
<i class="material-icons" role="presentation">people</i>Social
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<li class="bmd-layout-spacer"></li>
|
||||||
|
<a class="list-group-item">
|
||||||
|
<i class="material-icons" role="presentation">help_outline</i><span class="sr-only">Help</span>
|
||||||
|
</a>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<main class="bmd-layout-content">
|
||||||
|
<div class="container">
|
||||||
|
<!-- yield content here -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</div>
|
9568
grunt/npm-shrinkwrap.json
generated
9568
grunt/npm-shrinkwrap.json
generated
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +0,0 @@
|
||||||
//var external = Object.keys( require( './package.json' ).dependencies );
|
|
||||||
|
|
||||||
export default {
|
|
||||||
entry: 'js/src/index.js',
|
|
||||||
sourceMap: true
|
|
||||||
//external: external
|
|
||||||
};
|
|
|
@ -1,10 +0,0 @@
|
||||||
import config from './rollup.config.js';
|
|
||||||
import extend from 'extend'
|
|
||||||
import babel from 'rollup-plugin-babel';
|
|
||||||
|
|
||||||
export default extend(true, config, {
|
|
||||||
plugins: [babel()],
|
|
||||||
format: 'iife',
|
|
||||||
entry: 'docs/assets/js/src/index.js',
|
|
||||||
dest: 'docs/dist/js/docs.iife.js'
|
|
||||||
})
|
|
|
@ -1,7 +0,0 @@
|
||||||
import config from './rollup.config.js';
|
|
||||||
import extend from 'extend'
|
|
||||||
|
|
||||||
export default extend(true, config, {
|
|
||||||
format: 'es6',
|
|
||||||
dest: 'dist/js/bootstrap-material-design.es.js'
|
|
||||||
})
|
|
|
@ -1,9 +0,0 @@
|
||||||
import config from './rollup.config.js';
|
|
||||||
import extend from 'extend'
|
|
||||||
import babel from 'rollup-plugin-babel';
|
|
||||||
|
|
||||||
export default extend(true, config, {
|
|
||||||
plugins: [babel()],
|
|
||||||
format: 'iife',
|
|
||||||
dest: 'dist/js/bootstrap-material-design.iife.js'
|
|
||||||
})
|
|
|
@ -1,9 +0,0 @@
|
||||||
import config from './rollup.config.js';
|
|
||||||
import extend from 'extend'
|
|
||||||
import babel from 'rollup-plugin-babel';
|
|
||||||
|
|
||||||
export default extend(true, config, {
|
|
||||||
plugins: [babel()],
|
|
||||||
format: 'umd',
|
|
||||||
dest: 'dist/js/bootstrap-material-design.umd.js'
|
|
||||||
})
|
|
|
@ -1,71 +0,0 @@
|
||||||
[
|
|
||||||
# Docs: https://saucelabs.com/docs/platforms/webdriver
|
|
||||||
|
|
||||||
{
|
|
||||||
browserName: "safari",
|
|
||||||
platform: "OS X 10.10"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
browserName: "chrome",
|
|
||||||
platform: "OS X 10.10"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
browserName: "firefox",
|
|
||||||
platform: "OS X 10.10"
|
|
||||||
},
|
|
||||||
|
|
||||||
# Mac Opera not currently supported by Sauce Labs
|
|
||||||
|
|
||||||
{
|
|
||||||
browserName: "internet explorer",
|
|
||||||
version: "11",
|
|
||||||
platform: "Windows 8.1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
browserName: "internet explorer",
|
|
||||||
version: "10",
|
|
||||||
platform: "Windows 8"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
browserName: "internet explorer",
|
|
||||||
version: "9",
|
|
||||||
platform: "Windows 7"
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
browserName: "chrome",
|
|
||||||
platform: "Windows 8.1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
browserName: "firefox",
|
|
||||||
platform: "Windows 8.1"
|
|
||||||
},
|
|
||||||
|
|
||||||
# Win Opera 15+ not currently supported by Sauce Labs
|
|
||||||
|
|
||||||
{
|
|
||||||
browserName: "iphone",
|
|
||||||
platform: "OS X 10.10",
|
|
||||||
version: "8.2"
|
|
||||||
},
|
|
||||||
|
|
||||||
# iOS Chrome not currently supported by Sauce Labs
|
|
||||||
|
|
||||||
# Linux (unofficial)
|
|
||||||
{
|
|
||||||
browserName: "chrome",
|
|
||||||
platform: "Linux"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
browserName: "firefox",
|
|
||||||
platform: "Linux"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Android Chrome not currently supported by Sauce Labs
|
|
||||||
# Android v5.0+ not currently supported by Sauce Labs
|
|
||||||
# { # Android Browser
|
|
||||||
# browserName: "android",
|
|
||||||
# version: "5.0",
|
|
||||||
# platform: "Linux"
|
|
||||||
# }
|
|
||||||
]
|
|
|
@ -1,9 +1,9 @@
|
||||||
import {Preset, Clean, CleanStylesheets, CleanJavascripts, Copy, Jekyll, CssNano, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, Aggregate, Uglify, parallel, series} from 'gulp-pipeline'
|
import {Preset, Clean, CleanStylesheets, CleanJavascripts, Copy, Jekyll, CssNano, Sass, RollupEs, RollupUmd, RollupIife, ScssLint, EsLint, Aggregate, Uglify, parallel, series} from 'gulp-pipeline'
|
||||||
|
|
||||||
// since we are using a docs cwd, we need to grap the source path to watch both docs js and core js
|
// since we are using a docs cwd, we need to grap the source path to watch both docs js and core js
|
||||||
import findup from 'findup-sync'
|
// import findup from 'findup-sync'
|
||||||
const coreJs = findup('js')
|
// const coreJs = findup('js')
|
||||||
const coreScss = findup('scss')
|
// const coreScss = findup('scss')
|
||||||
|
|
||||||
const referenceDocNotice =
|
const referenceDocNotice =
|
||||||
`$1\n
|
`$1\n
|
|
@ -1,35 +1,34 @@
|
||||||
import {Preset, Clean, Copy, Jekyll, CssNano, Prepublish, PublishBuild, PublishGhPages, Sass, RollupUmd, RollupIife, ScssLint, EsLint, Aggregate, Uglify, series, parallel} from 'gulp-pipeline'
|
import {
|
||||||
|
Preset,
|
||||||
|
Clean,
|
||||||
|
Copy,
|
||||||
|
Jekyll,
|
||||||
|
CssNano,
|
||||||
|
Prepublish,
|
||||||
|
PublishBuild,
|
||||||
|
PublishGhPages,
|
||||||
|
Sass,
|
||||||
|
RollupUmd,
|
||||||
|
RollupIife,
|
||||||
|
ScssLint,
|
||||||
|
EsLint,
|
||||||
|
Aggregate,
|
||||||
|
Uglify,
|
||||||
|
series,
|
||||||
|
parallel
|
||||||
|
} from 'gulp-pipeline'
|
||||||
import gulp from 'gulp'
|
import gulp from 'gulp'
|
||||||
import findup from 'findup-sync'
|
import findup from 'findup-sync'
|
||||||
import pkg from './package.json'
|
import pkg from './package.json'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import gulpDocs from './gulp-docs'
|
import gulpDocs from './gulpfile.babel.docs'
|
||||||
|
|
||||||
const node_modules = findup('node_modules')
|
const node_modules = findup('node_modules')
|
||||||
|
|
||||||
// we have a lot of aggregates, which add listeners
|
// we have a lot of aggregates, which add listeners
|
||||||
gulp.setMaxListeners(20)
|
gulp.setMaxListeners(20)
|
||||||
|
|
||||||
const preset = Preset.baseline({
|
const preset = Preset.baseline({postProcessor: {dest: 'dist'}})
|
||||||
javascripts: {
|
|
||||||
source: {options: {cwd: 'js/src'}},
|
|
||||||
watch: {options: {cwd: 'js/src'}},
|
|
||||||
test: {options: {cwd: 'js/tests'}}
|
|
||||||
},
|
|
||||||
stylesheets: {
|
|
||||||
source: {options: {cwd: 'scss'}},
|
|
||||||
watch: {options: {cwd: 'scss'}}
|
|
||||||
},
|
|
||||||
images: {
|
|
||||||
source: {options: {cwd: 'images'}},
|
|
||||||
watch: {options: {cwd: 'images'}}
|
|
||||||
},
|
|
||||||
postProcessor: {
|
|
||||||
dest: 'dist' //'dist/digest'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
// When converting non-modular dependencies into usable ones using rollup-plugin-commonjs, if they don't have properly read exports add them here.
|
// When converting non-modular dependencies into usable ones using rollup-plugin-commonjs, if they don't have properly read exports add them here.
|
||||||
let namedExports = {}
|
let namedExports = {}
|
||||||
|
@ -47,9 +46,9 @@ const rollupConfig = {
|
||||||
clipboard: 'Clipboard'
|
clipboard: 'Clipboard'
|
||||||
},
|
},
|
||||||
banner: `/*!
|
banner: `/*!
|
||||||
* Bootstrap Material Design v${pkg.version} (${pkg.homepage})
|
* ${pkg.name} v${pkg.version} (${pkg.homepage})
|
||||||
* Copyright 2014-${moment().format("YYYY")} ${pkg.author}
|
* Copyright ${moment().format("YYYY")} ${pkg.author}
|
||||||
* Licensed under MIT (https://github.com/FezVrasta/bootstrap-material-design/blob/master/LICENSE)
|
* Licensed under ${pkg.license}
|
||||||
*/`
|
*/`
|
||||||
},
|
},
|
||||||
commonjs: {
|
commonjs: {
|
||||||
|
@ -96,9 +95,8 @@ const js = new Aggregate(gulp, 'js',
|
||||||
),
|
),
|
||||||
new Uglify(gulp, preset, {
|
new Uglify(gulp, preset, {
|
||||||
task: {name: 'iife:uglify'},
|
task: {name: 'iife:uglify'},
|
||||||
source: { glob: '*.iife.js' }
|
source: {glob: '*.iife.js'}
|
||||||
}),
|
}),
|
||||||
|
|
||||||
copyJsToDocs
|
copyJsToDocs
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -107,7 +105,7 @@ const css = new Aggregate(gulp, 'css',
|
||||||
series(gulp,
|
series(gulp,
|
||||||
new ScssLint(gulp, preset),
|
new ScssLint(gulp, preset),
|
||||||
new Sass(gulp, preset),
|
new Sass(gulp, preset),
|
||||||
new CssNano(gulp, preset),
|
new CssNano(gulp, preset, {debug: true}),
|
||||||
copyCssToDocs
|
copyCssToDocs
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* eslint-disable no-unused-vars */
|
/* eslint-disable no-unused-vars */
|
||||||
import 'babel-polyfill/dist/polyfill'
|
import '../../picker.js/node_modules/babel-polyfill/dist/polyfill'
|
||||||
import 'bootstrap'
|
import 'bootstrap'
|
||||||
|
|
||||||
// invalidComponentMatches is currently disabled due to https://github.com/rollup/rollup/issues/428#issuecomment-170066452
|
// invalidComponentMatches is currently disabled due to https://github.com/rollup/rollup/issues/428#issuecomment-170066452
|
|
@ -1,61 +0,0 @@
|
||||||
## How does the test suite work?
|
|
||||||
|
|
||||||
Bootstrap uses [QUnit](http://api.qunitjs.com/), a powerful, easy-to-use JavaScript unit test framework. Each plugin has a file dedicated to its tests in `unit/<plugin-name>.js`.
|
|
||||||
|
|
||||||
* `unit/` contains the unit test files for each Bootstrap plugin.
|
|
||||||
* `vendor/` contains third-party testing-related code (QUnit and jQuery).
|
|
||||||
* `visual/` contains "visual" tests which are run interactively in real browsers and require manual verification by humans.
|
|
||||||
|
|
||||||
To run the unit test suite via [PhantomJS](http://phantomjs.org/), run `grunt test-js`.
|
|
||||||
|
|
||||||
To run the unit test suite via a real web browser, open `index.html` in the browser.
|
|
||||||
|
|
||||||
|
|
||||||
## How do I add a new unit test?
|
|
||||||
|
|
||||||
1. Locate and open the file dedicated to the plugin which you need to add tests to (`unit/<plugin-name>.js`).
|
|
||||||
2. Review the [QUnit API Documentation](http://api.qunitjs.com/) and use the existing tests as references for how to structure your new tests.
|
|
||||||
3. Write the necessary unit test(s) for the new or revised functionality.
|
|
||||||
4. Run `grunt test-js` to see the results of your newly-added test(s).
|
|
||||||
|
|
||||||
**Note:** Your new unit tests should fail before your changes are applied to the plugin, and should pass after your changes are applied to the plugin.
|
|
||||||
|
|
||||||
## What should a unit test look like?
|
|
||||||
|
|
||||||
* Each test should have a unique name clearly stating what unit is being tested.
|
|
||||||
* Each test should test only one unit per test, although one test can include several assertions. Create multiple tests for multiple units of functionality.
|
|
||||||
* Each test should begin with [`assert.expect`](http://api.qunitjs.com/expect/) to ensure that the expected assertions are run.
|
|
||||||
* Each test should follow the project's [JavaScript Code Guidelines](https://github.com/FezVrasta/bootstrap-material-design/blob/master/CONTRIBUTING.md#js)
|
|
||||||
|
|
||||||
### Example tests
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
// Synchronous test
|
|
||||||
QUnit.test('should describe the unit being tested', function (assert) {
|
|
||||||
assert.expect(1)
|
|
||||||
var templateHTML = '<div class="alert alert-danger fade in">'
|
|
||||||
+ '<a class="close" href="#" data-dismiss="alert">×</a>'
|
|
||||||
+ '<p><strong>Template necessary for the test.</p>'
|
|
||||||
+ '</div>'
|
|
||||||
var $alert = $(templateHTML).appendTo('#qunit-fixture').bootstrapAlert()
|
|
||||||
|
|
||||||
$alert.find('.close').click()
|
|
||||||
|
|
||||||
// Make assertion
|
|
||||||
assert.strictEqual($alert.hasClass('in'), false, 'remove .in class on .close click')
|
|
||||||
})
|
|
||||||
|
|
||||||
// Asynchronous test
|
|
||||||
QUnit.test('should describe the unit being tested', function (assert) {
|
|
||||||
assert.expect(1)
|
|
||||||
var done = assert.async()
|
|
||||||
|
|
||||||
$('<div title="tooltip title"></div>')
|
|
||||||
.appendTo('#qunit-fixture')
|
|
||||||
.on('shown.bs.tooltip', function () {
|
|
||||||
assert.ok(true, '"shown" event was fired after calling "show"')
|
|
||||||
done()
|
|
||||||
})
|
|
||||||
.bootstrapTooltip('show')
|
|
||||||
})
|
|
||||||
```
|
|
|
@ -1,168 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>Bootstrap Plugin Test Suite</title>
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
|
|
||||||
<!-- jQuery -->
|
|
||||||
<script src="vendor/jquery.min.js"></script>
|
|
||||||
<script src="vendor/tether.min.js"></script>
|
|
||||||
<script>
|
|
||||||
// Disable jQuery event aliases to ensure we don't accidentally use any of them
|
|
||||||
(function () {
|
|
||||||
var eventAliases = [
|
|
||||||
'blur',
|
|
||||||
'focus',
|
|
||||||
'focusin',
|
|
||||||
'focusout',
|
|
||||||
'load',
|
|
||||||
'resize',
|
|
||||||
'scroll',
|
|
||||||
'unload',
|
|
||||||
'click',
|
|
||||||
'dblclick',
|
|
||||||
'mousedown',
|
|
||||||
'mouseup',
|
|
||||||
'mousemove',
|
|
||||||
'mouseover',
|
|
||||||
'mouseout',
|
|
||||||
'mouseenter',
|
|
||||||
'mouseleave',
|
|
||||||
'change',
|
|
||||||
'select',
|
|
||||||
'submit',
|
|
||||||
'keydown',
|
|
||||||
'keypress',
|
|
||||||
'keyup',
|
|
||||||
'error',
|
|
||||||
'contextmenu',
|
|
||||||
'hover',
|
|
||||||
'bind',
|
|
||||||
'unbind',
|
|
||||||
'delegate',
|
|
||||||
'undelegate'
|
|
||||||
]
|
|
||||||
for (var i = 0; i < eventAliases.length; i++) {
|
|
||||||
$.fn[eventAliases[i]] = undefined
|
|
||||||
}
|
|
||||||
})()
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!-- QUnit -->
|
|
||||||
<link rel="stylesheet" href="vendor/qunit.css" media="screen">
|
|
||||||
<script src="vendor/qunit.js"></script>
|
|
||||||
<script>
|
|
||||||
// See https://github.com/axemclion/grunt-saucelabs#test-result-details-with-qunit
|
|
||||||
var log = []
|
|
||||||
// Require assert.expect in each test
|
|
||||||
QUnit.config.requireExpects = true
|
|
||||||
QUnit.done(function (testResults) {
|
|
||||||
var tests = []
|
|
||||||
for (var i = 0, len = log.length; i < len; i++) {
|
|
||||||
var details = log[i]
|
|
||||||
tests.push({
|
|
||||||
name: details.name,
|
|
||||||
result: details.result,
|
|
||||||
expected: details.expected,
|
|
||||||
actual: details.actual,
|
|
||||||
source: details.source
|
|
||||||
})
|
|
||||||
}
|
|
||||||
testResults.tests = tests
|
|
||||||
|
|
||||||
window.global_test_results = testResults
|
|
||||||
})
|
|
||||||
|
|
||||||
QUnit.testStart(function (testDetails) {
|
|
||||||
$(window).scrollTop(0)
|
|
||||||
QUnit.log(function (details) {
|
|
||||||
if (!details.result) {
|
|
||||||
details.name = testDetails.name
|
|
||||||
log.push(details)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
// Cleanup
|
|
||||||
QUnit.testDone(function () {
|
|
||||||
$('#qunit-fixture').empty()
|
|
||||||
$('#modal-test, .modal-backdrop').remove()
|
|
||||||
})
|
|
||||||
|
|
||||||
// Display fixture on-screen on iOS to avoid false positives
|
|
||||||
if (/iPhone|iPad|iPod/.test(navigator.userAgent)) {
|
|
||||||
QUnit.begin(function() {
|
|
||||||
$('#qunit-fixture').css({ top: 0, left: 0 })
|
|
||||||
})
|
|
||||||
|
|
||||||
QUnit.done(function () {
|
|
||||||
$('#qunit-fixture').css({ top: '', left: '' })
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// Disable deprecated global QUnit method aliases in preparation for QUnit v2
|
|
||||||
(function () {
|
|
||||||
var methodNames = [
|
|
||||||
'async',
|
|
||||||
'asyncTest',
|
|
||||||
'deepEqual',
|
|
||||||
'equal',
|
|
||||||
'expect',
|
|
||||||
'module',
|
|
||||||
'notDeepEqual',
|
|
||||||
'notEqual',
|
|
||||||
'notPropEqual',
|
|
||||||
'notStrictEqual',
|
|
||||||
'ok',
|
|
||||||
'propEqual',
|
|
||||||
'push',
|
|
||||||
'start',
|
|
||||||
'stop',
|
|
||||||
'strictEqual',
|
|
||||||
'test',
|
|
||||||
'throws'
|
|
||||||
];
|
|
||||||
for (var i = 0; i < methodNames.length; i++) {
|
|
||||||
var methodName = methodNames[i];
|
|
||||||
window[methodName] = undefined;
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!-- es6 Plugin sources -->
|
|
||||||
<!--
|
|
||||||
<script src="../../js/dist/util.js"></script>
|
|
||||||
<script src="../../js/dist/alert.js"></script>
|
|
||||||
<script src="../../js/dist/button.js"></script>
|
|
||||||
<script src="../../js/dist/carousel.js"></script>
|
|
||||||
<script src="../../js/dist/collapse.js"></script>
|
|
||||||
<script src="../../js/dist/dropdown.js"></script>
|
|
||||||
<script src="../../js/dist/modal.js"></script>
|
|
||||||
<script src="../../js/dist/scrollspy.js"></script>
|
|
||||||
<script src="../../js/dist/tab.js"></script>
|
|
||||||
<script src="../../js/dist/tooltip.js"></script>
|
|
||||||
<script src="../../js/dist/popover.js"></script>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- Unit tests -->
|
|
||||||
<!--
|
|
||||||
<script src="unit/alert.js"></script>
|
|
||||||
<script src="unit/button.js"></script>
|
|
||||||
<script src="unit/carousel.js"></script>
|
|
||||||
<script src="unit/collapse.js"></script>
|
|
||||||
<script src="unit/dropdown.js"></script>
|
|
||||||
<script src="unit/modal.js"></script>
|
|
||||||
<script src="unit/scrollspy.js"></script>
|
|
||||||
<script src="unit/tab.js"></script>
|
|
||||||
<script src="unit/tooltip.js"></script>
|
|
||||||
<script src="unit/popover.js"></script>
|
|
||||||
-->
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="qunit-container">
|
|
||||||
<div id="qunit"></div>
|
|
||||||
<div id="qunit-fixture"></div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
4
js/tests/vendor/jquery.min.js
vendored
4
js/tests/vendor/jquery.min.js
vendored
File diff suppressed because one or more lines are too long
291
js/tests/vendor/qunit.css
vendored
291
js/tests/vendor/qunit.css
vendored
|
@ -1,291 +0,0 @@
|
||||||
/*!
|
|
||||||
* QUnit 1.18.0
|
|
||||||
* http://qunitjs.com/
|
|
||||||
*
|
|
||||||
* Copyright jQuery Foundation and other contributors
|
|
||||||
* Released under the MIT license
|
|
||||||
* http://jquery.org/license
|
|
||||||
*
|
|
||||||
* Date: 2015-04-03T10:23Z
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** Font Family and Sizes */
|
|
||||||
|
|
||||||
#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
|
|
||||||
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
|
|
||||||
#qunit-tests { font-size: smaller; }
|
|
||||||
|
|
||||||
|
|
||||||
/** Resets */
|
|
||||||
|
|
||||||
#qunit-tests, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult, #qunit-modulefilter {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/** Header */
|
|
||||||
|
|
||||||
#qunit-header {
|
|
||||||
padding: 0.5em 0 0.5em 1em;
|
|
||||||
|
|
||||||
color: #8699A4;
|
|
||||||
background-color: #0D3349;
|
|
||||||
|
|
||||||
font-size: 1.5em;
|
|
||||||
line-height: 1em;
|
|
||||||
font-weight: 400;
|
|
||||||
|
|
||||||
border-radius: 5px 5px 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-header a {
|
|
||||||
text-decoration: none;
|
|
||||||
color: #C2CCD1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-header a:hover,
|
|
||||||
#qunit-header a:focus {
|
|
||||||
color: #FFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-testrunner-toolbar label {
|
|
||||||
display: inline-block;
|
|
||||||
padding: 0 0.5em 0 0.1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-banner {
|
|
||||||
height: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-testrunner-toolbar {
|
|
||||||
padding: 0.5em 1em 0.5em 1em;
|
|
||||||
color: #5E740B;
|
|
||||||
background-color: #EEE;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-userAgent {
|
|
||||||
padding: 0.5em 1em 0.5em 1em;
|
|
||||||
background-color: #2B81AF;
|
|
||||||
color: #FFF;
|
|
||||||
text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-modulefilter-container {
|
|
||||||
float: right;
|
|
||||||
padding: 0.2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.qunit-url-config {
|
|
||||||
display: inline-block;
|
|
||||||
padding: 0.1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.qunit-filter {
|
|
||||||
display: block;
|
|
||||||
float: right;
|
|
||||||
margin-left: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Tests: Pass/Fail */
|
|
||||||
|
|
||||||
#qunit-tests {
|
|
||||||
list-style-position: inside;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests li {
|
|
||||||
padding: 0.4em 1em 0.4em 1em;
|
|
||||||
border-bottom: 1px solid #FFF;
|
|
||||||
list-style-position: inside;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests > li {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests li.running,
|
|
||||||
#qunit-tests li.pass,
|
|
||||||
#qunit-tests li.fail,
|
|
||||||
#qunit-tests li.skipped {
|
|
||||||
display: list-item;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests.hidepass li.running,
|
|
||||||
#qunit-tests.hidepass li.pass {
|
|
||||||
visibility: hidden;
|
|
||||||
position: absolute;
|
|
||||||
width: 0px;
|
|
||||||
height: 0px;
|
|
||||||
padding: 0;
|
|
||||||
border: 0;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests li strong {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests li.skipped strong {
|
|
||||||
cursor: default;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests li a {
|
|
||||||
padding: 0.5em;
|
|
||||||
color: #C2CCD1;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests li p a {
|
|
||||||
padding: 0.25em;
|
|
||||||
color: #6B6464;
|
|
||||||
}
|
|
||||||
#qunit-tests li a:hover,
|
|
||||||
#qunit-tests li a:focus {
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests li .runtime {
|
|
||||||
float: right;
|
|
||||||
font-size: smaller;
|
|
||||||
}
|
|
||||||
|
|
||||||
.qunit-assert-list {
|
|
||||||
margin-top: 0.5em;
|
|
||||||
padding: 0.5em;
|
|
||||||
|
|
||||||
background-color: #FFF;
|
|
||||||
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.qunit-collapsed {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests table {
|
|
||||||
border-collapse: collapse;
|
|
||||||
margin-top: 0.2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests th {
|
|
||||||
text-align: right;
|
|
||||||
vertical-align: top;
|
|
||||||
padding: 0 0.5em 0 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests td {
|
|
||||||
vertical-align: top;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests pre {
|
|
||||||
margin: 0;
|
|
||||||
white-space: pre-wrap;
|
|
||||||
word-wrap: break-word;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests del {
|
|
||||||
background-color: #E0F2BE;
|
|
||||||
color: #374E0C;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests ins {
|
|
||||||
background-color: #FFCACA;
|
|
||||||
color: #500;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*** Test Counts */
|
|
||||||
|
|
||||||
#qunit-tests b.counts { color: #000; }
|
|
||||||
#qunit-tests b.passed { color: #5E740B; }
|
|
||||||
#qunit-tests b.failed { color: #710909; }
|
|
||||||
|
|
||||||
#qunit-tests li li {
|
|
||||||
padding: 5px;
|
|
||||||
background-color: #FFF;
|
|
||||||
border-bottom: none;
|
|
||||||
list-style-position: inside;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*** Passing Styles */
|
|
||||||
|
|
||||||
#qunit-tests li li.pass {
|
|
||||||
color: #3C510C;
|
|
||||||
background-color: #FFF;
|
|
||||||
border-left: 10px solid #C6E746;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
|
|
||||||
#qunit-tests .pass .test-name { color: #366097; }
|
|
||||||
|
|
||||||
#qunit-tests .pass .test-actual,
|
|
||||||
#qunit-tests .pass .test-expected { color: #999; }
|
|
||||||
|
|
||||||
#qunit-banner.qunit-pass { background-color: #C6E746; }
|
|
||||||
|
|
||||||
/*** Failing Styles */
|
|
||||||
|
|
||||||
#qunit-tests li li.fail {
|
|
||||||
color: #710909;
|
|
||||||
background-color: #FFF;
|
|
||||||
border-left: 10px solid #EE5757;
|
|
||||||
white-space: pre;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests > li:last-child {
|
|
||||||
border-radius: 0 0 5px 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests .fail { color: #000; background-color: #EE5757; }
|
|
||||||
#qunit-tests .fail .test-name,
|
|
||||||
#qunit-tests .fail .module-name { color: #000; }
|
|
||||||
|
|
||||||
#qunit-tests .fail .test-actual { color: #EE5757; }
|
|
||||||
#qunit-tests .fail .test-expected { color: #008000; }
|
|
||||||
|
|
||||||
#qunit-banner.qunit-fail { background-color: #EE5757; }
|
|
||||||
|
|
||||||
/*** Skipped tests */
|
|
||||||
|
|
||||||
#qunit-tests .skipped {
|
|
||||||
background-color: #EBECE9;
|
|
||||||
}
|
|
||||||
|
|
||||||
#qunit-tests .qunit-skipped-label {
|
|
||||||
background-color: #F4FF77;
|
|
||||||
display: inline-block;
|
|
||||||
font-style: normal;
|
|
||||||
color: #366097;
|
|
||||||
line-height: 1.8em;
|
|
||||||
padding: 0 0.5em;
|
|
||||||
margin: -0.4em 0.4em -0.4em 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Result */
|
|
||||||
|
|
||||||
#qunit-testresult {
|
|
||||||
padding: 0.5em 1em 0.5em 1em;
|
|
||||||
|
|
||||||
color: #2B81AF;
|
|
||||||
background-color: #D2E0E6;
|
|
||||||
|
|
||||||
border-bottom: 1px solid #FFF;
|
|
||||||
}
|
|
||||||
#qunit-testresult .module-name {
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Fixture */
|
|
||||||
|
|
||||||
#qunit-fixture {
|
|
||||||
position: absolute;
|
|
||||||
top: -10000px;
|
|
||||||
left: -10000px;
|
|
||||||
width: 1000px;
|
|
||||||
height: 1000px;
|
|
||||||
}
|
|
3828
js/tests/vendor/qunit.js
vendored
3828
js/tests/vendor/qunit.js
vendored
File diff suppressed because it is too large
Load Diff
2
js/tests/vendor/tether.min.js
vendored
2
js/tests/vendor/tether.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -36,7 +36,7 @@
|
||||||
"babel-polyfill": "^6.7",
|
"babel-polyfill": "^6.7",
|
||||||
"bootstrap": "twbs/bootstrap#v4-dev",
|
"bootstrap": "twbs/bootstrap#v4-dev",
|
||||||
"jquery": "^2.2",
|
"jquery": "^2.2",
|
||||||
"tether": "^1.2.4"
|
"tether": "^1.3.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-core": "^6.7.7",
|
"babel-core": "^6.7.7",
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
"babel-preset-es2015": "^6.6.0",
|
"babel-preset-es2015": "^6.6.0",
|
||||||
"extend": "^3.0.0",
|
"extend": "^3.0.0",
|
||||||
"gulp": "github:gulpjs/gulp#4.0",
|
"gulp": "github:gulpjs/gulp#4.0",
|
||||||
"gulp-pipeline": "^4.0.29",
|
"gulp-pipeline": "^4.0.33",
|
||||||
"moment": "^2.13.0"
|
"moment": "^2.13.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
"name": "bootstrap-material-design",
|
|
||||||
"description": "Material Design for Bootstrap, the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.",
|
|
||||||
"tags": ["bootstrap-material-design", "bootstrap", "material-design", "grid", "typography", "buttons", "ui", "responsive-web-design"]
|
|
||||||
}
|
|
|
@ -60,18 +60,13 @@
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: row wrap;
|
flex-flow: row wrap;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
min-width: $bmd-menu-item-min-width;
|
min-width: $bmd-menu-item-min-width;
|
||||||
max-width: $bmd-menu-item-max-width;
|
max-width: $bmd-menu-item-max-width;
|
||||||
min-height: $bmd-menu-item-min-height;
|
min-height: $bmd-menu-item-min-height;
|
||||||
|
|
||||||
align-items: center;
|
padding: $bmd-menu-item-padding-top $bmd-menu-item-padding-right $bmd-menu-item-padding-bottom $bmd-menu-item-padding-left;
|
||||||
|
|
||||||
padding-top: $bmd-menu-item-padding-top;
|
|
||||||
padding-right: $bmd-menu-item-padding-right;
|
|
||||||
padding-bottom: $bmd-menu-item-padding-bottom;
|
|
||||||
padding-left: $bmd-menu-item-padding-left;
|
|
||||||
|
|
||||||
|
|
||||||
// FIXME: multi-line menu word wrapping doesn't work - see the maximum width example in menus.md
|
// FIXME: multi-line menu word wrapping doesn't work - see the maximum width example in menus.md
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
|
@ -29,9 +29,9 @@
|
||||||
top: 50%;
|
top: 50%;
|
||||||
left: 0;
|
left: 0;
|
||||||
display: block;
|
display: block;
|
||||||
|
align-self: center;
|
||||||
width: $bmd-switch-handle-size;
|
width: $bmd-switch-handle-size;
|
||||||
height: $bmd-switch-handle-size;
|
height: $bmd-switch-handle-size;
|
||||||
align-self: center;
|
|
||||||
content: "";
|
content: "";
|
||||||
background: $bmd-switch-handle-unchecked-bg;
|
background: $bmd-switch-handle-unchecked-bg;
|
||||||
border-radius: 100%;
|
border-radius: 100%;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user