Setup CI tests (#100)

* use @xarc/xrun to streamline tasks in an imperative manner

* add lint-staged/husky for git hook tasks

* run prettier across all files

* fixing tests

* add ci test workflow

* add a ci workflow

* remove precommit in favor of husky

* add .prettierrc.js

* reformat with prettier
This commit is contained in:
Vu Nguyen
2021-01-13 23:05:05 -06:00
committed by GitHub
parent 649c64cf1d
commit 9ef655ac3b
117 changed files with 9484 additions and 4342 deletions

2
.eslintignore Normal file
View File

@@ -0,0 +1,2 @@
assets
public

26
.github/workflows/nodejs.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: test
on:
push:
branches: [master]
pull_request:
branches: [master]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your ob can access it
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 11.15.0
- run: npm ci
- run: npm test

3
.prettierignore Normal file
View File

@@ -0,0 +1,3 @@
coverage
public
vendor

5
.prettierrc.js Normal file
View File

@@ -0,0 +1,5 @@
module.exports = {
printWidth: 100,
singleQuote: true,
trailingComma: 'all',
};

6
DEVELOPMENT.md Normal file
View File

@@ -0,0 +1,6 @@
## Pre-requisites
- node v11.15.0
- npm 6.7.0
It is suggested you use [nvm](https://github.com/nvm-sh/nvm) to manage your node version

View File

@@ -1,11 +1,9 @@
chrome-wakatime # chrome-wakatime
===============
Automatic time tracking for stats about your website debugging, research, documentation, etc. Automatic time tracking for stats about your website debugging, research, documentation, etc.
Note: Activity from this Chrome extension will not display on leaderboards, so installing this extension may lower your rank. Note: Activity from this Chrome extension will not display on leaderboards, so installing this extension may lower your rank.
## Installation ## Installation
1. Install the extension: 1. Install the extension:
@@ -20,7 +18,6 @@ Note: Activity from this Chrome extension will not display on leaderboards, so i
5. Use in conjunction with [other WakaTime plugins](https://wakatime.com/plugins). 5. Use in conjunction with [other WakaTime plugins](https://wakatime.com/plugins).
## Screenshots ## Screenshots
![SC open](./screenshots/sc_6-green.png) ![SC open](./screenshots/sc_6-green.png)
@@ -29,12 +26,12 @@ Note: Activity from this Chrome extension will not display on leaderboards, so i
![Options SC](./screenshots/sc_8-options.png) ![Options SC](./screenshots/sc_8-options.png)
## Development instructions ## Development instructions
> For development purposes only. > For development purposes only.
To get started, install NPM and Bower dependencies, and do an initial build with Gulp: To get started, install NPM and Bower dependencies, and do an initial build with Gulp:
``` ```
npm start npm start
``` ```
@@ -57,7 +54,7 @@ Run tests:
npm test npm test
``` ```
Lint code *(Both JS and JSX)*: Lint code _(Both JS and JSX)_:
``` ```
jsxhint --jsx-only . jsxhint --jsx-only .
@@ -67,16 +64,14 @@ jsxhint --jsx-only .
There is a precommit hook that lints the code before commiting the changes. There is a precommit hook that lints the code before commiting the changes.
### Load unpacked in Chrome ### Load unpacked in Chrome
1. Clone repository to disk 1. Clone repository to disk
2. Remove `browser_specific_settings` key from manifest.json (only necessary for firefox) 2. Remove `browser_specific_settings` key from manifest.json (only necessary for firefox)
2. Go to `Settings``Extensions` 3. Go to `Settings``Extensions`
3. Enable `Developer mode` 4. Enable `Developer mode`
4. Click `Load unpacked extension...` 5. Click `Load unpacked extension...`
5. Select repository directory 6. Select repository directory
### Troubleshooting ### Troubleshooting

View File

@@ -1,4 +1,3 @@
/* This is a fix for Bootstrap requiring jQuery */ /* This is a fix for Bootstrap requiring jQuery */
global.jQuery = require('jquery'); global.jQuery = require('jquery');
require('bootstrap'); require('bootstrap');
@@ -9,7 +8,4 @@ var ReactDOM = require('react-dom');
// React components // React components
var WakaTime = require('./components/WakaTime.jsx'); var WakaTime = require('./components/WakaTime.jsx');
ReactDOM.render( ReactDOM.render(<WakaTime />, document.getElementById('wakatime'));
<WakaTime />,
document.getElementById('wakatime')
);

View File

@@ -3,13 +3,9 @@ var reactCreateClass = require('create-react-class');
var classNames = require('classnames'); var classNames = require('classnames');
var Alert = reactCreateClass({ var Alert = reactCreateClass({
render: function () { render: function () {
return( return <div className={classNames('alert', 'alert-' + this.props.type)}>{this.props.text}</div>;
<div className={classNames('alert', 'alert-' + this.props.type)}>{this.props.text}</div> },
);
}
}); });
module.exports = Alert; module.exports = Alert;

View File

@@ -2,9 +2,7 @@
var React = require('react'); var React = require('react');
var reactCreateClass = require('create-react-class'); var reactCreateClass = require('create-react-class');
var MainList = reactCreateClass({ var MainList = reactCreateClass({
_openOptionsPage: function () { _openOptionsPage: function () {
if (browser.runtime.openOptionsPage) { if (browser.runtime.openOptionsPage) {
// New way to open options pages, if supported (Chrome 42+). // New way to open options pages, if supported (Chrome 42+).
@@ -16,7 +14,6 @@ var MainList = reactCreateClass({
}, },
render: function () { render: function () {
var that = this; var that = this;
var loginLogoutButton = function () { var loginLogoutButton = function () {
@@ -41,25 +38,34 @@ var MainList = reactCreateClass({
// If logging is enabled, display that info to user // If logging is enabled, display that info to user
var loggingStatus = function () { var loggingStatus = function () {
if(that.props.loggingEnabled === true && that.props.loggedIn === true) if (that.props.loggingEnabled === true && that.props.loggedIn === true) {
{
return ( return (
<div className="row"> <div className="row">
<div className="col-xs-12"> <div className="col-xs-12">
<p> <p>
<a href="#" onClick={that.props.disableLogging} className="btn btn-danger btn-block">Disable logging</a> <a
href="#"
onClick={that.props.disableLogging}
className="btn btn-danger btn-block"
>
Disable logging
</a>
</p> </p>
</div> </div>
</div> </div>
); );
} } else if (that.props.loggingEnabled === false && that.props.loggedIn === true) {
else if(that.props.loggingEnabled === false && that.props.loggedIn === true)
{
return ( return (
<div className="row"> <div className="row">
<div className="col-xs-12"> <div className="col-xs-12">
<p> <p>
<a href="#" onClick={that.props.enableLogging} className="btn btn-success btn-block">Enable logging</a> <a
href="#"
onClick={that.props.enableLogging}
className="btn btn-success btn-block"
>
Enable logging
</a>
</p> </p>
</div> </div>
</div> </div>
@@ -74,7 +80,9 @@ var MainList = reactCreateClass({
<div className="col-xs-12"> <div className="col-xs-12">
<blockquote> <blockquote>
<p>{that.props.totalTimeLoggedToday}</p> <p>{that.props.totalTimeLoggedToday}</p>
<small><cite>TOTAL TIME LOGGED TODAY</cite></small> <small>
<cite>TOTAL TIME LOGGED TODAY</cite>
</small>
</blockquote> </blockquote>
</div> </div>
</div> </div>
@@ -84,7 +92,6 @@ var MainList = reactCreateClass({
return ( return (
<div> <div>
{totalTimeLoggedToday()} {totalTimeLoggedToday()}
{loggingStatus()} {loggingStatus()}
@@ -96,12 +103,10 @@ var MainList = reactCreateClass({
</a> </a>
{loginLogoutButton()} {loginLogoutButton()}
</div> </div>
</div> </div>
); );
} },
}); });
module.exports = MainList; module.exports = MainList;

View File

@@ -2,15 +2,15 @@ var React = require('react');
var reactCreateClass = require('create-react-class'); var reactCreateClass = require('create-react-class');
var NavBar = reactCreateClass({ var NavBar = reactCreateClass({
render: function () { render: function () {
var that = this; var that = this;
var signedInAs = function () { var signedInAs = function () {
if (that.props.loggedIn === true) { if (that.props.loggedIn === true) {
return ( return (
<p className="navbar-text">Signed in as <b>{that.props.user.full_name}</b></p> <p className="navbar-text">
Signed in as <b>{that.props.user.full_name}</b>
</p>
); );
} }
}; };
@@ -45,7 +45,12 @@ var NavBar = reactCreateClass({
<nav className="navbar navbar-default" role="navigation"> <nav className="navbar navbar-default" role="navigation">
<div className="container-fluid"> <div className="container-fluid">
<div className="navbar-header"> <div className="navbar-header">
<button type="button" className="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <button
type="button"
className="navbar-toggle collapsed"
data-toggle="collapse"
data-target="#bs-example-navbar-collapse-1"
>
<span className="sr-only">Toggle navigation</span> <span className="sr-only">Toggle navigation</span>
<i className="fa fa-fw fa-cogs"></i> <i className="fa fa-fw fa-cogs"></i>
</button> </button>
@@ -60,7 +65,13 @@ var NavBar = reactCreateClass({
{customRules()} {customRules()}
{dashboard()} {dashboard()}
<li className="dropdown"> <li className="dropdown">
<a href="#" className="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> <a
href="#"
className="dropdown-toggle"
data-toggle="dropdown"
role="button"
aria-expanded="false"
>
<i className="fa fa-fw fa-info"></i> <i className="fa fa-fw fa-info"></i>
About About
<span className="caret"></span> <span className="caret"></span>
@@ -69,12 +80,14 @@ var NavBar = reactCreateClass({
<li> <li>
<a target="_blank" href="https://github.com/wakatime/chrome-wakatime/issues"> <a target="_blank" href="https://github.com/wakatime/chrome-wakatime/issues">
<i className="fa fa-fw fa-bug"></i> <i className="fa fa-fw fa-bug"></i>
Report an Issue</a> Report an Issue
</a>
</li> </li>
<li> <li>
<a target="_blank" href="https://github.com/wakatime/chrome-wakatime"> <a target="_blank" href="https://github.com/wakatime/chrome-wakatime">
<i className="fa fa-fw fa-github"></i> <i className="fa fa-fw fa-github"></i>
View on GitHub</a> View on GitHub
</a>
</li> </li>
</ul> </ul>
</li> </li>
@@ -83,8 +96,7 @@ var NavBar = reactCreateClass({
</div> </div>
</nav> </nav>
); );
} },
}); });
module.exports = NavBar; module.exports = NavBar;

View File

@@ -17,7 +17,6 @@ var SitesList = require('./SitesList.jsx');
* @type {*|Function} * @type {*|Function}
*/ */
var Options = reactCreateClass({ var Options = reactCreateClass({
getInitialState: function () { getInitialState: function () {
return { return {
theme: config.theme, theme: config.theme,
@@ -27,7 +26,7 @@ var Options = reactCreateClass({
loggingStyle: config.loggingStyle, loggingStyle: config.loggingStyle,
displayAlert: false, displayAlert: false,
alertType: config.alert.success.type, alertType: config.alert.success.type,
alertText: config.alert.success.text alertText: config.alert.success.text,
}; };
}, },
@@ -38,19 +37,21 @@ var Options = reactCreateClass({
restoreSettings: function () { restoreSettings: function () {
var that = this; var that = this;
browser.storage.sync.get({ browser.storage.sync
.get({
theme: config.theme, theme: config.theme,
blacklist: '', blacklist: '',
whitelist: '', whitelist: '',
loggingType: config.loggingType, loggingType: config.loggingType,
loggingStyle: config.loggingStyle loggingStyle: config.loggingStyle,
}).then(function (items) { })
.then(function (items) {
that.setState({ that.setState({
theme: items.theme, theme: items.theme,
blacklist: items.blacklist, blacklist: items.blacklist,
whitelist: items.whitelist, whitelist: items.whitelist,
loggingType: items.loggingType, loggingType: items.loggingType,
loggingStyle: items.loggingStyle loggingStyle: items.loggingStyle,
}); });
that.refs.theme.value = items.theme; that.refs.theme.value = items.theme;
@@ -76,13 +77,15 @@ var Options = reactCreateClass({
var whitelist = that.state.whitelist.trim(); var whitelist = that.state.whitelist.trim();
// Sync options with google storage. // Sync options with google storage.
browser.storage.sync.set({ browser.storage.sync
.set({
theme: theme, theme: theme,
blacklist: blacklist, blacklist: blacklist,
whitelist: whitelist, whitelist: whitelist,
loggingType: loggingType, loggingType: loggingType,
loggingStyle: loggingStyle loggingStyle: loggingStyle,
}).then(function () { })
.then(function () {
// Set state to be newly entered values. // Set state to be newly entered values.
that.setState({ that.setState({
theme: theme, theme: theme,
@@ -90,7 +93,7 @@ var Options = reactCreateClass({
whitelist: whitelist, whitelist: whitelist,
loggingType: loggingType, loggingType: loggingType,
loggingStyle: loggingStyle, loggingStyle: loggingStyle,
displayAlert: true displayAlert: true,
}); });
}); });
}, },
@@ -103,42 +106,44 @@ var Options = reactCreateClass({
_updateBlacklistState: function (sites) { _updateBlacklistState: function (sites) {
this.setState({ this.setState({
blacklist: sites blacklist: sites,
}); });
}, },
_updateWhitelistState: function (sites) { _updateWhitelistState: function (sites) {
this.setState({ this.setState({
whitelist: sites whitelist: sites,
}); });
}, },
render: function () { render: function () {
var that = this; var that = this;
var alert = function () { var alert = function () {
if (that.state.displayAlert === true) { if (that.state.displayAlert === true) {
setTimeout(function () { setTimeout(function () {
that.setState({ displayAlert: false }); that.setState({ displayAlert: false });
}, 2000); }, 2000);
return ( return (
<Alert key={that.state.alertText} type={that.state.alertType} text={that.state.alertText} /> <Alert
key={that.state.alertText}
type={that.state.alertType}
text={that.state.alertText}
/>
); );
} }
}; };
var loggingStyle = function () { var loggingStyle = function () {
if (that.state.loggingStyle == 'blacklist') { if (that.state.loggingStyle == 'blacklist') {
return ( return (
<SitesList <SitesList
handleChange={that._updateBlacklistState} handleChange={that._updateBlacklistState}
label="Blacklist" label="Blacklist"
sites={that.state.blacklist} sites={that.state.blacklist}
helpText="Sites that you don't want to show in your reports." /> helpText="Sites that you don't want to show in your reports."
/>
); );
} }
@@ -148,27 +153,34 @@ var Options = reactCreateClass({
label="Whitelist" label="Whitelist"
sites={that.state.whitelist} sites={that.state.whitelist}
placeholder="http://google.com&#10;http://myproject.com@@MyProject" placeholder="http://google.com&#10;http://myproject.com@@MyProject"
helpText="Sites that you want to show in your reports. You can assign URL to project by adding @@YourProject at the end of line." /> helpText="Sites that you want to show in your reports. You can assign URL to project by adding @@YourProject at the end of line."
/>
); );
}; };
return ( return (
<div className="container"> <div className="container">
<div className="row"> <div className="row">
<div className="col-md-12"> <div className="col-md-12">
<ReactCSSTransitionGroup
<ReactCSSTransitionGroup transitionName="alert" transitionEnterTimeout={500} transitionLeaveTimeout={300}> transitionName="alert"
transitionEnterTimeout={500}
transitionLeaveTimeout={300}
>
{alert()} {alert()}
</ReactCSSTransitionGroup> </ReactCSSTransitionGroup>
<form className="form-horizontal" onSubmit={this._handleSubmit}> <form className="form-horizontal" onSubmit={this._handleSubmit}>
<div className="form-group"> <div className="form-group">
<label className="col-lg-2 control-label">Logging style</label> <label className="col-lg-2 control-label">Logging style</label>
<div className="col-lg-10"> <div className="col-lg-10">
<select className="form-control" ref="loggingStyle" defaultValue="blacklist" onChange={this._displayBlackOrWhiteList}> <select
className="form-control"
ref="loggingStyle"
defaultValue="blacklist"
onChange={this._displayBlackOrWhiteList}
>
<option value="blacklist">All except blacklisted sites</option> <option value="blacklist">All except blacklisted sites</option>
<option value="whitelist">Only whitelisted sites</option> <option value="whitelist">Only whitelisted sites</option>
</select> </select>
@@ -189,7 +201,9 @@ var Options = reactCreateClass({
</div> </div>
<div className="form-group"> <div className="form-group">
<label htmlFor="theme" className="col-lg-2 control-label">Theme</label> <label htmlFor="theme" className="col-lg-2 control-label">
Theme
</label>
<div className="col-lg-10"> <div className="col-lg-10">
<select className="form-control" ref="theme" defaultValue="light"> <select className="form-control" ref="theme" defaultValue="light">
@@ -201,16 +215,17 @@ var Options = reactCreateClass({
<div className="form-group"> <div className="form-group">
<div className="col-lg-10 col-lg-offset-2"> <div className="col-lg-10 col-lg-offset-2">
<button type="submit" className="btn btn-primary">Save</button> <button type="submit" className="btn btn-primary">
Save
</button>
</div> </div>
</div> </div>
</form> </form>
</div> </div>
</div> </div>
</div> </div>
); );
} },
}); });
module.exports = Options; module.exports = Options;

View File

@@ -2,10 +2,9 @@ var React = require('react');
var reactCreateClass = require('create-react-class'); var reactCreateClass = require('create-react-class');
var SitesList = reactCreateClass({ var SitesList = reactCreateClass({
getDefaultProps: function () { getDefaultProps: function () {
return { return {
placeholder: 'http://google.com' placeholder: 'http://google.com',
}; };
}, },
@@ -16,21 +15,30 @@ var SitesList = reactCreateClass({
}, },
render: function () { render: function () {
return ( return (
<div className="form-group"> <div className="form-group">
<label htmlFor="sites" className="col-lg-2 control-label">{this.props.label}</label> <label htmlFor="sites" className="col-lg-2 control-label">
{this.props.label}
</label>
<div className="col-lg-10"> <div className="col-lg-10">
<textarea className="form-control" rows="3" ref="sites" onChange={this._handleChange} <textarea
placeholder={this.props.placeholder} value={this.props.sites}></textarea> className="form-control"
<span className="help-block">{this.props.helpText} rows="3"
ref="sites"
onChange={this._handleChange}
placeholder={this.props.placeholder}
value={this.props.sites}
></textarea>
<span className="help-block">
{this.props.helpText}
<br /> <br />
One line per site.</span> One line per site.
</span>
</div> </div>
</div> </div>
); );
} },
}); });
module.exports = SitesList; module.exports = SitesList;

View File

@@ -1,6 +1,6 @@
/* global browser */ /* global browser */
var React = require("react"); var React = require('react');
var reactCreateClass = require('create-react-class'); var reactCreateClass = require('create-react-class');
var $ = require('jquery'); var $ = require('jquery');
@@ -17,39 +17,36 @@ var WakaTimeCore = require('../core/WakaTimeCore').default;
var changeExtensionState = require('../helpers/changeExtensionState'); var changeExtensionState = require('../helpers/changeExtensionState');
var Wakatime = reactCreateClass({ var Wakatime = reactCreateClass({
getInitialState: function () { getInitialState: function () {
return { return {
user: { user: {
full_name: null, full_name: null,
email: null, email: null,
photo: null photo: null,
}, },
loggedIn: false, loggedIn: false,
loggingEnabled: config.loggingEnabled, loggingEnabled: config.loggingEnabled,
totalTimeLoggedToday: '0 minutes' totalTimeLoggedToday: '0 minutes',
}; };
}, },
componentDidMount: function () { componentDidMount: function () {
var wakatime = new WakaTimeCore(); var wakatime = new WakaTimeCore();
var that = this; var that = this;
wakatime.checkAuth().done(function (data) { wakatime.checkAuth().done(function (data) {
if (data !== false) { if (data !== false) {
browser.storage.sync
browser.storage.sync.get({ .get({
loggingEnabled: config.loggingEnabled loggingEnabled: config.loggingEnabled,
}).then(function(items) { })
.then(function (items) {
that.setState({ loggingEnabled: items.loggingEnabled }); that.setState({ loggingEnabled: items.loggingEnabled });
if (items.loggingEnabled === true) { if (items.loggingEnabled === true) {
changeExtensionState('allGood'); changeExtensionState('allGood');
} } else {
else {
changeExtensionState('notLogging'); changeExtensionState('notLogging');
} }
}); });
@@ -58,24 +55,22 @@ var Wakatime = reactCreateClass({
user: { user: {
full_name: data.full_name, full_name: data.full_name,
email: data.email, email: data.email,
photo: data.photo photo: data.photo,
}, },
loggedIn: true loggedIn: true,
}); });
wakatime.getTotalTimeLoggedToday().done(function (grand_total) { wakatime.getTotalTimeLoggedToday().done(function (grand_total) {
that.setState({ that.setState({
totalTimeLoggedToday: grand_total.text totalTimeLoggedToday: grand_total.text,
}); });
}); });
wakatime.recordHeartbeat(); wakatime.recordHeartbeat();
} } else {
else {
changeExtensionState('notSignedIn'); changeExtensionState('notSignedIn');
} }
}); });
}, },
logoutUser: function () { logoutUser: function () {
@@ -87,72 +82,64 @@ var Wakatime = reactCreateClass({
url: config.logoutUserUrl, url: config.logoutUserUrl,
method: 'GET', method: 'GET',
success: function () { success: function () {
deferredObject.resolve(that); deferredObject.resolve(that);
}, },
error: function (xhr, status, err) { error: function (xhr, status, err) {
console.error(config.logoutUserUrl, status, err.toString()); console.error(config.logoutUserUrl, status, err.toString());
deferredObject.resolve(that); deferredObject.resolve(that);
} },
}); });
return deferredObject.promise(); return deferredObject.promise();
}, },
_logoutUser: function () { _logoutUser: function () {
var that = this; var that = this;
this.logoutUser().done(function () { this.logoutUser().done(function () {
that.setState({ that.setState({
user: { user: {
full_name: null, full_name: null,
email: null, email: null,
photo: null photo: null,
}, },
loggedIn: false, loggedIn: false,
loggingEnabled: false loggingEnabled: false,
}); });
changeExtensionState('notSignedIn'); changeExtensionState('notSignedIn');
}); });
}, },
_disableLogging: function () { _disableLogging: function () {
this.setState({ this.setState({
loggingEnabled: false loggingEnabled: false,
}); });
changeExtensionState('notLogging'); changeExtensionState('notLogging');
browser.storage.sync.set({ browser.storage.sync.set({
loggingEnabled: false loggingEnabled: false,
}); });
}, },
_enableLogging: function () { _enableLogging: function () {
this.setState({ this.setState({
loggingEnabled: true loggingEnabled: true,
}); });
changeExtensionState('allGood'); changeExtensionState('allGood');
browser.storage.sync.set({ browser.storage.sync.set({
loggingEnabled: true loggingEnabled: true,
}); });
}, },
render: function () { render: function () {
return ( return (
<div> <div>
<NavBar <NavBar user={this.state.user} loggedIn={this.state.loggedIn} />
user={this.state.user}
loggedIn={this.state.loggedIn} />
<div className="container"> <div className="container">
<div className="row"> <div className="row">
<div className="col-md-12"> <div className="col-md-12">
@@ -163,14 +150,14 @@ var Wakatime = reactCreateClass({
user={this.state.user} user={this.state.user}
totalTimeLoggedToday={this.state.totalTimeLoggedToday} totalTimeLoggedToday={this.state.totalTimeLoggedToday}
logoutUser={this._logoutUser} logoutUser={this._logoutUser}
loggedIn={this.state.loggedIn} /> loggedIn={this.state.loggedIn}
/>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
); );
} },
}); });
module.exports = Wakatime; module.exports = Wakatime;

View File

@@ -1,11 +1,10 @@
/* global browser */ /* global browser */
//jshint esnext:true //jshint esnext:true
var config = { var config = {
// Extension name // Extension name
name: 'WakaTime', name: 'WakaTime',
// Extension version // Extension version
version: browser.runtime.getManifest().version, version: process.env.NODE_ENV === 'test' ? 'test' : browser.runtime.getManifest().version,
// Time for idle state of the browser // Time for idle state of the browser
// The user is considered idle if there was // The user is considered idle if there was
// no activity in the browser for x seconds // no activity in the browser for x seconds
@@ -31,7 +30,7 @@ var config = {
allGood: '', allGood: '',
notLogging: 'gray', notLogging: 'gray',
notSignedIn: 'red', notSignedIn: 'red',
lightTheme: 'white' lightTheme: 'white',
}, },
// Tooltips for each of the extension states // Tooltips for each of the extension states
tooltips: { tooltips: {
@@ -39,29 +38,23 @@ var config = {
notLogging: 'Not logging', notLogging: 'Not logging',
notSignedIn: 'Not signed In', notSignedIn: 'Not signed In',
blacklisted: 'This URL is blacklisted', blacklisted: 'This URL is blacklisted',
whitelisted: 'This URL is not on your whitelist' whitelisted: 'This URL is not on your whitelist',
}, },
// Default theme // Default theme
theme: 'light', theme: 'light',
// Valid extension states // Valid extension states
states: [ states: ['allGood', 'notLogging', 'notSignedIn', 'blacklisted', 'whitelisted'],
'allGood',
'notLogging',
'notSignedIn',
'blacklisted',
'whitelisted'
],
// Predefined alert type and text for success and failure. // Predefined alert type and text for success and failure.
alert: { alert: {
success: { success: {
type: 'success', type: 'success',
text: 'Options have been saved!' text: 'Options have been saved!',
}, },
failure: { failure: {
type: 'danger', type: 'danger',
text: 'There was an error while saving the options!' text: 'There was an error while saving the options!',
} },
} },
}; };
module.exports = config; module.exports = config;

View File

@@ -32,7 +32,7 @@ class WakaTimeCore {
$.ajax({ $.ajax({
url: config.summariesApiUrl + '?start=' + today + '&end=' + today, url: config.summariesApiUrl + '?start=' + today + '&end=' + today,
dataType: 'json', dataType: 'json',
success: data => { success: (data) => {
deferredObject.resolve(data.data[0].grand_total); deferredObject.resolve(data.data[0].grand_total);
}, },
error: (xhr, status, err) => { error: (xhr, status, err) => {
@@ -56,7 +56,7 @@ class WakaTimeCore {
$.ajax({ $.ajax({
url: config.currentUserApiUrl, url: config.currentUserApiUrl,
dataType: 'json', dataType: 'json',
success: data => { success: (data) => {
deferredObject.resolve(data.data); deferredObject.resolve(data.data);
}, },
error: (xhr, status, err) => { error: (xhr, status, err) => {
@@ -80,14 +80,14 @@ class WakaTimeCore {
blacklist: '', blacklist: '',
whitelist: '', whitelist: '',
}) })
.then(items => { .then((items) => {
if (items.loggingEnabled === true) { if (items.loggingEnabled === true) {
changeExtensionState('allGood'); changeExtensionState('allGood');
browser.idle.queryState(config.detectionIntervalInSeconds).then(newState => { browser.idle.queryState(config.detectionIntervalInSeconds).then((newState) => {
if (newState === 'active') { if (newState === 'active') {
// Get current tab URL. // Get current tab URL.
browser.tabs.query({ currentWindow: true, active: true }).then(tabs => { browser.tabs.query({ currentWindow: true, active: true }).then((tabs) => {
if (tabs.length == 0) return; if (tabs.length == 0) return;
var currentActiveTab = tabs[0]; var currentActiveTab = tabs[0];
@@ -141,9 +141,9 @@ class WakaTimeCore {
* @returns {object} * @returns {object}
*/ */
getHeartbeat(url, list) { getHeartbeat(url, list) {
const projectIndicatorCharacters = '@@'; var projectIndicatorCharacters = '@@';
const lines = list.split('\n'); var lines = list.split('\n');
for (var i = 0; i < lines.length; i++) { for (var i = 0; i < lines.length; i++) {
// strip (http:// or https://) and trailing (`/` or `@@`) // strip (http:// or https://) and trailing (`/` or `@@`)
var cleanLine = lines[i] var cleanLine = lines[i]
@@ -241,7 +241,7 @@ class WakaTimeCore {
sendHeartbeat(heartbeat, debug) { sendHeartbeat(heartbeat, debug) {
var payload = null; var payload = null;
this._getLoggingType().done(loggingType => { this._getLoggingType().done((loggingType) => {
// Get only the domain from the entity. // Get only the domain from the entity.
// And send that in heartbeat // And send that in heartbeat
if (loggingType == 'domain') { if (loggingType == 'domain') {
@@ -283,7 +283,7 @@ class WakaTimeCore {
// nothing to do here // nothing to do here
}, },
}, },
success: response => { success: (response) => {
deferredObject.resolve(this); deferredObject.resolve(this);
}, },
error: (xhr, status, err) => { error: (xhr, status, err) => {

View File

@@ -2,11 +2,11 @@
// Create a connection to the background page // Create a connection to the background page
var backgroundPageConnection = browser.runtime.connect({ var backgroundPageConnection = browser.runtime.connect({
name: "devtools-page" name: 'devtools-page',
}); });
// Send a message to background page with the current active tabId // Send a message to background page with the current active tabId
backgroundPageConnection.postMessage({ backgroundPageConnection.postMessage({
name: 'init', name: 'init',
tabId: browser.devtools.inspectedWindow.tabId tabId: browser.devtools.inspectedWindow.tabId,
}); });

View File

@@ -1,7 +1,7 @@
/* global browser */ /* global browser */
// Core // Core
var WakaTimeCore = require("./core/WakaTimeCore").default; var WakaTimeCore = require('./core/WakaTimeCore').default;
// initialize class // initialize class
var wakatime = new WakaTimeCore(); var wakatime = new WakaTimeCore();
@@ -15,7 +15,6 @@ browser.alarms.onAlarm.addListener(function (alarm) {
// |alarm| can be undefined because onAlarm also gets called from // |alarm| can be undefined because onAlarm also gets called from
// window.setTimeout on old chrome versions. // window.setTimeout on old chrome versions.
if (alarm && alarm.name == 'heartbeatAlarm') { if (alarm && alarm.name == 'heartbeatAlarm') {
console.log('recording a heartbeat - alarm triggered'); console.log('recording a heartbeat - alarm triggered');
wakatime.recordHeartbeat(); wakatime.recordHeartbeat();
@@ -29,21 +28,17 @@ browser.alarms.create('heartbeatAlarm', {periodInMinutes: 2});
* Whenever a active tab is changed it records a heartbeat with that tab url. * Whenever a active tab is changed it records a heartbeat with that tab url.
*/ */
browser.tabs.onActivated.addListener(function (activeInfo) { browser.tabs.onActivated.addListener(function (activeInfo) {
browser.tabs.get(activeInfo.tabId).then(function (tab) { browser.tabs.get(activeInfo.tabId).then(function (tab) {
console.log('recording a heartbeat - active tab changed'); console.log('recording a heartbeat - active tab changed');
wakatime.recordHeartbeat(); wakatime.recordHeartbeat();
}); });
}); });
/** /**
* Whenever a active window is changed it records a heartbeat with the active tab url. * Whenever a active window is changed it records a heartbeat with the active tab url.
*/ */
browser.windows.onFocusChanged.addListener(function (windowId) { browser.windows.onFocusChanged.addListener(function (windowId) {
if (windowId != browser.windows.WINDOW_ID_NONE) { if (windowId != browser.windows.WINDOW_ID_NONE) {
console.log('recording a heartbeat - active window changed'); console.log('recording a heartbeat - active window changed');
@@ -51,7 +46,6 @@ browser.windows.onFocusChanged.addListener(function (windowId) {
} else { } else {
console.log('lost focus'); console.log('lost focus');
} }
}); });
/** /**
@@ -59,7 +53,6 @@ browser.windows.onFocusChanged.addListener(function (windowId) {
* currently active and if it is, then it records a heartbeat. * currently active and if it is, then it records a heartbeat.
*/ */
browser.tabs.onUpdated.addListener(function (tabId, changeInfo, tab) { browser.tabs.onUpdated.addListener(function (tabId, changeInfo, tab) {
if (changeInfo.status === 'complete') { if (changeInfo.status === 'complete') {
// Get current tab URL. // Get current tab URL.
browser.tabs.query({ currentWindow: true, active: true }).then(function (tabs) { browser.tabs.query({ currentWindow: true, active: true }).then(function (tabs) {
@@ -71,22 +64,17 @@ browser.tabs.onUpdated.addListener(function (tabId, changeInfo, tab) {
} }
}); });
} }
}); });
/** /**
* This is in charge of detecting if devtools are opened or closed * This is in charge of detecting if devtools are opened or closed
* and sending a heartbeat depending on that. * and sending a heartbeat depending on that.
*/ */
browser.runtime.onConnect.addListener(function (port) { browser.runtime.onConnect.addListener(function (port) {
if (port.name == 'devtools-page') {
if (port.name == "devtools-page") {
// Listen to messages sent from the DevTools page // Listen to messages sent from the DevTools page
port.onMessage.addListener(function (message, sender, sendResponse) { port.onMessage.addListener(function (message, sender, sendResponse) {
if (message.name == "init") { if (message.name == 'init') {
connections[message.tabId] = port; connections[message.tabId] = port;
wakatime.setTabsWithDevtoolsOpen(Object.keys(connections)); wakatime.setTabsWithDevtoolsOpen(Object.keys(connections));
@@ -96,7 +84,6 @@ browser.runtime.onConnect.addListener(function (port) {
}); });
port.onDisconnect.addListener(function (port) { port.onDisconnect.addListener(function (port) {
var tabs = Object.keys(connections); var tabs = Object.keys(connections);
for (var i = 0, len = tabs.length; i < len; i++) { for (var i = 0, len = tabs.length; i < len; i++) {
@@ -110,6 +97,5 @@ browser.runtime.onConnect.addListener(function (port) {
wakatime.recordHeartbeat(); wakatime.recordHeartbeat();
}); });
} }
}); });

View File

@@ -9,7 +9,6 @@ var config = require('../config');
* @param color * @param color
*/ */
function changeExtensionIcon(color) { function changeExtensionIcon(color) {
color = color ? color : ''; color = color ? color : '';
var path = null; var path = null;
@@ -20,31 +19,31 @@ function changeExtensionIcon(color) {
path = './graphics/wakatime-logo-38' + color + '.png'; path = './graphics/wakatime-logo-38' + color + '.png';
browser.browserAction.setIcon({ browser.browserAction.setIcon({
path: path path: path,
}); });
} }
if (color === '') { if (color === '') {
browser.storage.sync.get({ browser.storage.sync
theme: config.theme .get({
}).then(function (items) { theme: config.theme,
})
.then(function (items) {
if (items.theme == config.theme) { if (items.theme == config.theme) {
path = './graphics/wakatime-logo-38.png'; path = './graphics/wakatime-logo-38.png';
browser.browserAction.setIcon({ browser.browserAction.setIcon({
path: path path: path,
}); });
} } else {
else {
path = './graphics/wakatime-logo-38-white.png'; path = './graphics/wakatime-logo-38-white.png';
browser.browserAction.setIcon({ browser.browserAction.setIcon({
path: path path: path,
}); });
} }
}); });
} }
} }
module.exports = changeExtensionIcon; module.exports = changeExtensionIcon;

View File

@@ -8,11 +8,9 @@ var config = require('../config');
* @param text * @param text
*/ */
function changeExtensionTooltip(text) { function changeExtensionTooltip(text) {
if (text === '') { if (text === '') {
text = config.name; text = config.name;
} } else {
else {
text = config.name + ' - ' + text; text = config.name + ' - ' + text;
} }

View File

@@ -10,14 +10,13 @@ function contains(url, list) {
var lines = list.split('\n'); var lines = list.split('\n');
for (var i = 0; i < lines.length; i++) { for (var i = 0; i < lines.length; i++) {
// Trim all lines from the list one by one // Trim all lines from the list one by one
var cleanLine = lines[i].trim(); var cleanLine = lines[i].trim();
// If by any chance one line in the list is empty, ignore it // If by any chance one line in the list is empty, ignore it
if (cleanLine === '') continue; if (cleanLine === '') continue;
var lineRe = new RegExp(cleanLine.replace('.', '\.').replace('*', '.*')); var lineRe = new RegExp(cleanLine.replace('.', '.').replace('*', '.*'));
// If url matches the current line return true // If url matches the current line return true
if (lineRe.test(url)) { if (lineRe.test(url)) {

View File

@@ -7,7 +7,7 @@
function getDomainFromUrl(url) { function getDomainFromUrl(url) {
var parts = url.split('/'); var parts = url.split('/');
return parts[0] + "//" + parts[2]; return parts[0] + '//' + parts[2];
} }
module.exports = getDomainFromUrl; module.exports = getDomainFromUrl;

View File

@@ -10,7 +10,4 @@ var ReactDOM = require('react-dom');
// React components // React components
var Options = require('./components/Options.jsx'); var Options = require('./components/Options.jsx');
ReactDOM.render( ReactDOM.render(<Options />, document.getElementById('wakatime-options'));
<Options />,
document.getElementById('wakatime-options')
);

View File

@@ -1,9 +1,9 @@
@import "bootstrap/bootstrap"; @import 'bootstrap/bootstrap';
@import "font-awesome/font-awesome"; @import 'font-awesome/font-awesome';
@import "bootswatch/paper/bootswatch"; @import 'bootswatch/paper/bootswatch';
@import "bootswatch/paper/variables"; @import 'bootswatch/paper/variables';
@import "variables"; @import 'variables';
@import "partials/_animations"; @import 'partials/_animations';
body { body {
min-width: 357px; min-width: 357px;

View File

@@ -2,7 +2,6 @@
// Alerts // Alerts
// -------------------------------------------------- // --------------------------------------------------
// Base styles // Base styles
// ------------------------- // -------------------------

View File

@@ -2,7 +2,6 @@
// Badges // Badges
// -------------------------------------------------- // --------------------------------------------------
// Base class // Base class
.badge { .badge {
display: inline-block; display: inline-block;

View File

@@ -1,56 +1,56 @@
/*! /*!
* Bootstrap v3.3.6 (http://getbootstrap.com) * Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc. * Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */
// Core variables and mixins // Core variables and mixins
@import "variables.less"; @import 'variables.less';
@import "mixins.less"; @import 'mixins.less';
// Reset and dependencies // Reset and dependencies
@import "normalize.less"; @import 'normalize.less';
@import "print.less"; @import 'print.less';
@import "glyphicons.less"; @import 'glyphicons.less';
// Core CSS // Core CSS
@import "scaffolding.less"; @import 'scaffolding.less';
@import "type.less"; @import 'type.less';
@import "code.less"; @import 'code.less';
@import "grid.less"; @import 'grid.less';
@import "tables.less"; @import 'tables.less';
@import "forms.less"; @import 'forms.less';
@import "buttons.less"; @import 'buttons.less';
// Components // Components
@import "component-animations.less"; @import 'component-animations.less';
@import "dropdowns.less"; @import 'dropdowns.less';
@import "button-groups.less"; @import 'button-groups.less';
@import "input-groups.less"; @import 'input-groups.less';
@import "navs.less"; @import 'navs.less';
@import "navbar.less"; @import 'navbar.less';
@import "breadcrumbs.less"; @import 'breadcrumbs.less';
@import "pagination.less"; @import 'pagination.less';
@import "pager.less"; @import 'pager.less';
@import "labels.less"; @import 'labels.less';
@import "badges.less"; @import 'badges.less';
@import "jumbotron.less"; @import 'jumbotron.less';
@import "thumbnails.less"; @import 'thumbnails.less';
@import "alerts.less"; @import 'alerts.less';
@import "progress-bars.less"; @import 'progress-bars.less';
@import "media.less"; @import 'media.less';
@import "list-group.less"; @import 'list-group.less';
@import "panels.less"; @import 'panels.less';
@import "responsive-embed.less"; @import 'responsive-embed.less';
@import "wells.less"; @import 'wells.less';
@import "close.less"; @import 'close.less';
// Components w/ JavaScript // Components w/ JavaScript
@import "modals.less"; @import 'modals.less';
@import "tooltip.less"; @import 'tooltip.less';
@import "popovers.less"; @import 'popovers.less';
@import "carousel.less"; @import 'carousel.less';
// Utility classes // Utility classes
@import "utilities.less"; @import 'utilities.less';
@import "responsive-utilities.less"; @import 'responsive-utilities.less';

View File

@@ -2,7 +2,6 @@
// Breadcrumbs // Breadcrumbs
// -------------------------------------------------- // --------------------------------------------------
.breadcrumb { .breadcrumb {
padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal; padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal;
margin-bottom: @line-height-computed; margin-bottom: @line-height-computed;
@@ -14,7 +13,7 @@
display: inline-block; display: inline-block;
+ li:before { + li:before {
content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space content: '@{breadcrumb-separator}\00a0'; // Unicode space added since inline-block means non-collapsing white-space
padding: 0 5px; padding: 0 5px;
color: @breadcrumb-color; color: @breadcrumb-color;
} }

View File

@@ -59,7 +59,7 @@
.border-right-radius(0); .border-right-radius(0);
} }
} }
// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it // Need .dropdown-toggle since :last-child doesn't apply, given that a .dropdown-menu is used immediately after it
.btn-group > .btn:last-child:not(:first-child), .btn-group > .btn:last-child:not(:first-child),
.btn-group > .dropdown-toggle:not(:first-child) { .btn-group > .dropdown-toggle:not(:first-child) {
.border-left-radius(0); .border-left-radius(0);
@@ -88,15 +88,19 @@
outline: 0; outline: 0;
} }
// Sizing // Sizing
// //
// Remix the default button sizing classes into new ones for easier manipulation. // Remix the default button sizing classes into new ones for easier manipulation.
.btn-group-xs > .btn { &:extend(.btn-xs); } .btn-group-xs > .btn {
.btn-group-sm > .btn { &:extend(.btn-sm); } &:extend(.btn-xs);
.btn-group-lg > .btn { &:extend(.btn-lg); } }
.btn-group-sm > .btn {
&:extend(.btn-sm);
}
.btn-group-lg > .btn {
&:extend(.btn-lg);
}
// Split button dropdowns // Split button dropdowns
// ---------------------- // ----------------------
@@ -114,7 +118,7 @@
// The clickable button for toggling the menu // The clickable button for toggling the menu
// Remove the gradient and set the same inset shadow as the :active state // Remove the gradient and set the same inset shadow as the :active state
.btn-group.open .dropdown-toggle { .btn-group.open .dropdown-toggle {
.box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); .box-shadow(inset 0 3px 5px rgba(0,0,0,0.125));
// Show no shadow for `.btn-link` since it has no other button styles. // Show no shadow for `.btn-link` since it has no other button styles.
&.btn-link { &.btn-link {
@@ -122,7 +126,6 @@
} }
} }
// Reposition the caret // Reposition the caret
.btn .caret { .btn .caret {
margin-left: 0; margin-left: 0;
@@ -137,7 +140,6 @@
border-width: 0 @caret-width-large @caret-width-large; border-width: 0 @caret-width-large @caret-width-large;
} }
// Vertical button groups // Vertical button groups
// ---------------------- // ----------------------
@@ -194,7 +196,6 @@
.border-top-radius(0); .border-top-radius(0);
} }
// Justified button groups // Justified button groups
// ---------------------- // ----------------------
@@ -218,7 +219,6 @@
} }
} }
// Checkbox and radio options // Checkbox and radio options
// //
// In order to support the browser's form validation feedback, powered by the // In order to support the browser's form validation feedback, powered by the
@@ -231,11 +231,11 @@
// See https://github.com/twbs/bootstrap/pull/12794 and // See https://github.com/twbs/bootstrap/pull/12794 and
// https://github.com/twbs/bootstrap/pull/14559 for more information. // https://github.com/twbs/bootstrap/pull/14559 for more information.
[data-toggle="buttons"] { [data-toggle='buttons'] {
> .btn, > .btn,
> .btn-group > .btn { > .btn-group > .btn {
input[type="radio"], input[type='radio'],
input[type="checkbox"] { input[type='checkbox'] {
position: absolute; position: absolute;
clip: rect(0, 0, 0, 0); clip: rect(0, 0, 0, 0);
pointer-events: none; pointer-events: none;

View File

@@ -2,7 +2,6 @@
// Buttons // Buttons
// -------------------------------------------------- // --------------------------------------------------
// Base styles // Base styles
// -------------------------------------------------- // --------------------------------------------------
@@ -40,14 +39,14 @@
&.active { &.active {
outline: 0; outline: 0;
background-image: none; background-image: none;
.box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); .box-shadow(inset 0 3px 5px rgba(0,0,0,0.125));
} }
&.disabled, &.disabled,
&[disabled], &[disabled],
fieldset[disabled] & { fieldset[disabled] & {
cursor: @cursor-disabled; cursor: @cursor-disabled;
.opacity(.65); .opacity(0.65);
.box-shadow(none); .box-shadow(none);
} }
@@ -59,7 +58,6 @@
} }
} }
// Alternate buttons // Alternate buttons
// -------------------------------------------------- // --------------------------------------------------
@@ -86,7 +84,6 @@
.button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border); .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);
} }
// Link buttons // Link buttons
// ------------------------- // -------------------------
@@ -126,7 +123,6 @@
} }
} }
// Button Sizes // Button Sizes
// -------------------------------------------------- // --------------------------------------------------
@@ -142,7 +138,6 @@
.button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small); .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small);
} }
// Block button // Block button
// -------------------------------------------------- // --------------------------------------------------
@@ -157,9 +152,9 @@
} }
// Specificity overrides // Specificity overrides
input[type="submit"], input[type='submit'],
input[type="reset"], input[type='reset'],
input[type="button"] { input[type='button'] {
&.btn-block { &.btn-block {
width: 100%; width: 100%;
} }

View File

@@ -2,7 +2,6 @@
// Carousel // Carousel
// -------------------------------------------------- // --------------------------------------------------
// Wrapper for the slide container and indicators // Wrapper for the slide container and indicators
.carousel { .carousel {
position: relative; position: relative;
@@ -16,7 +15,7 @@
> .item { > .item {
display: none; display: none;
position: relative; position: relative;
.transition(.6s ease-in-out left); .transition(0.6s ease-in-out left);
// Account for jankitude on images // Account for jankitude on images
> img, > img,
@@ -84,7 +83,6 @@
> .active.right { > .active.right {
left: 100%; left: 100%;
} }
} }
// Left/right controls for nav // Left/right controls for nav
@@ -107,12 +105,12 @@
// Set gradients for backgrounds // Set gradients for backgrounds
&.left { &.left {
#gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001)); #gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001));;
} }
&.right { &.right {
left: auto; left: auto;
right: 0; right: 0;
#gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5)); #gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5));;
} }
// Hover/focus state // Hover/focus state
@@ -121,7 +119,7 @@
outline: 0; outline: 0;
color: @carousel-control-color; color: @carousel-control-color;
text-decoration: none; text-decoration: none;
.opacity(.9); .opacity(0.9);
} }
// Toggles // Toggles
@@ -153,7 +151,6 @@
font-family: serif; font-family: serif;
} }
.icon-prev { .icon-prev {
&:before { &:before {
content: '\2039'; // SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039) content: '\2039'; // SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039)
@@ -231,10 +228,8 @@
} }
} }
// Scale up controls for tablets and up // Scale up controls for tablets and up
@media screen and (min-width: @screen-sm-min) { @media screen and (min-width: @screen-sm-min) {
// Scale up the controls a smidge // Scale up the controls a smidge
.carousel-control { .carousel-control {
.glyphicon-chevron-left, .glyphicon-chevron-left,

View File

@@ -2,7 +2,6 @@
// Close icons // Close icons
// -------------------------------------------------- // --------------------------------------------------
.close { .close {
float: right; float: right;
font-size: (@font-size-base * 1.5); font-size: (@font-size-base * 1.5);
@@ -10,14 +9,14 @@
line-height: 1; line-height: 1;
color: @close-color; color: @close-color;
text-shadow: @close-text-shadow; text-shadow: @close-text-shadow;
.opacity(.2); .opacity(0.2);
&:hover, &:hover,
&:focus { &:focus {
color: @close-color; color: @close-color;
text-decoration: none; text-decoration: none;
cursor: pointer; cursor: pointer;
.opacity(.5); .opacity(0.5);
} }
// Additional properties for button version // Additional properties for button version

View File

@@ -2,7 +2,6 @@
// Code (inline and block) // Code (inline and block)
// -------------------------------------------------- // --------------------------------------------------
// Inline and block code styles // Inline and block code styles
code, code,
kbd, kbd,
@@ -27,7 +26,7 @@ kbd {
color: @kbd-color; color: @kbd-color;
background-color: @kbd-bg; background-color: @kbd-bg;
border-radius: @border-radius-small; border-radius: @border-radius-small;
box-shadow: inset 0 -1px 0 rgba(0,0,0,.25); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);
kbd { kbd {
padding: 0; padding: 0;

View File

@@ -9,7 +9,7 @@
.fade { .fade {
opacity: 0; opacity: 0;
.transition(opacity .15s linear); .transition(opacity 0.15s linear);
&.in { &.in {
opacity: 1; opacity: 1;
} }
@@ -18,16 +18,22 @@
.collapse { .collapse {
display: none; display: none;
&.in { display: block; } &.in {
tr&.in { display: table-row; } display: block;
tbody&.in { display: table-row-group; } }
tr&.in {
display: table-row;
}
tbody&.in {
display: table-row-group;
}
} }
.collapsing { .collapsing {
position: relative; position: relative;
height: 0; height: 0;
overflow: hidden; overflow: hidden;
.transition-property(~"height, visibility"); .transition-property(~'height, visibility');
.transition-duration(.35s); .transition-duration(0.35s);
.transition-timing-function(ease); .transition-timing-function(ease);
} }

View File

@@ -2,7 +2,6 @@
// Dropdown menus // Dropdown menus
// -------------------------------------------------- // --------------------------------------------------
// Dropdown arrow/caret // Dropdown arrow/caret
.caret { .caret {
display: inline-block; display: inline-block;
@@ -11,7 +10,7 @@
margin-left: 2px; margin-left: 2px;
vertical-align: middle; vertical-align: middle;
border-top: @caret-width-base dashed; border-top: @caret-width-base dashed;
border-top: @caret-width-base solid ~"\9"; // IE8 border-top: @caret-width-base solid ~'\9'; // IE8
border-right: @caret-width-base solid transparent; border-right: @caret-width-base solid transparent;
border-left: @caret-width-base solid transparent; border-left: @caret-width-base solid transparent;
} }
@@ -45,7 +44,7 @@
border: 1px solid @dropdown-fallback-border; // IE8 fallback border: 1px solid @dropdown-fallback-border; // IE8 fallback
border: 1px solid @dropdown-border; border: 1px solid @dropdown-border;
border-radius: @border-radius-base; border-radius: @border-radius-base;
.box-shadow(0 6px 12px rgba(0,0,0,.175)); .box-shadow(0 6px 12px rgba(0,0,0,0.175));
background-clip: padding-box; background-clip: padding-box;
// Aligns the dropdown menu to right // Aligns the dropdown menu to right
@@ -186,8 +185,8 @@
.caret { .caret {
border-top: 0; border-top: 0;
border-bottom: @caret-width-base dashed; border-bottom: @caret-width-base dashed;
border-bottom: @caret-width-base solid ~"\9"; // IE8 border-bottom: @caret-width-base solid ~'\9'; // IE8
content: ""; content: '';
} }
// Different positioning for bottom up menu // Different positioning for bottom up menu
.dropdown-menu { .dropdown-menu {
@@ -197,7 +196,6 @@
} }
} }
// Component alignment // Component alignment
// //
// Reiterate per navbar.less and the modified component alignment there. // Reiterate per navbar.less and the modified component alignment there.

View File

@@ -2,7 +2,6 @@
// Forms // Forms
// -------------------------------------------------- // --------------------------------------------------
// Normalize non-controls // Normalize non-controls
// //
// Restyle and baseline non-control form elements. // Restyle and baseline non-control form elements.
@@ -36,7 +35,6 @@ label {
font-weight: bold; font-weight: bold;
} }
// Normalize form controls // Normalize form controls
// //
// While most of our form styles require extra classes, some basic normalization // While most of our form styles require extra classes, some basic normalization
@@ -44,24 +42,24 @@ label {
// address browser inconsistencies. // address browser inconsistencies.
// Override content-box in Normalize (* isn't specific enough) // Override content-box in Normalize (* isn't specific enough)
input[type="search"] { input[type='search'] {
.box-sizing(border-box); .box-sizing(border-box);
} }
// Position radios and checkboxes better // Position radios and checkboxes better
input[type="radio"], input[type='radio'],
input[type="checkbox"] { input[type='checkbox'] {
margin: 4px 0 0; margin: 4px 0 0;
margin-top: 1px \9; // IE8-9 margin-top: 1px \9; // IE8-9
line-height: normal; line-height: normal;
} }
input[type="file"] { input[type='file'] {
display: block; display: block;
} }
// Make range inputs behave like textual form controls // Make range inputs behave like textual form controls
input[type="range"] { input[type='range'] {
display: block; display: block;
width: 100%; width: 100%;
} }
@@ -73,9 +71,9 @@ select[size] {
} }
// Focus for file, radio, and checkbox // Focus for file, radio, and checkbox
input[type="file"]:focus, input[type='file']:focus,
input[type="radio"]:focus, input[type='radio']:focus,
input[type="checkbox"]:focus { input[type='checkbox']:focus {
.tab-focus(); .tab-focus();
} }
@@ -88,7 +86,6 @@ output {
color: @input-color; color: @input-color;
} }
// Common form controls // Common form controls
// //
// Shared size and type resets for form controls. Apply `.form-control` to any // Shared size and type resets for form controls. Apply `.form-control` to any
@@ -123,8 +120,8 @@ output {
background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214 background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
border: 1px solid @input-border; border: 1px solid @input-border;
border-radius: @input-border-radius; // Note: This has no effect on <select>s in some browsers, due to the limited stylability of <select>s in CSS. border-radius: @input-border-radius; // Note: This has no effect on <select>s in some browsers, due to the limited stylability of <select>s in CSS.
.box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); .box-shadow(inset 0 1px 1px rgba(0,0,0,0.075));
.transition(~"border-color ease-in-out .15s, box-shadow ease-in-out .15s"); .transition(~'border-color ease-in-out .15s, box-shadow ease-in-out .15s');
// Customize the `:focus` state to imitate native WebKit styles. // Customize the `:focus` state to imitate native WebKit styles.
.form-control-focus(); .form-control-focus();
@@ -161,7 +158,6 @@ output {
} }
} }
// Search inputs in iOS // Search inputs in iOS
// //
// This overrides the extra rounded corners on search inputs in iOS so that our // This overrides the extra rounded corners on search inputs in iOS so that our
@@ -169,11 +165,10 @@ output {
// be added to `.form-control` as it's not specific enough. For details, see // be added to `.form-control` as it's not specific enough. For details, see
// https://github.com/twbs/bootstrap/issues/11586. // https://github.com/twbs/bootstrap/issues/11586.
input[type="search"] { input[type='search'] {
-webkit-appearance: none; -webkit-appearance: none;
} }
// Special styles for iOS temporal inputs // Special styles for iOS temporal inputs
// //
// In Mobile Safari, setting `display: block` on temporal inputs causes the // In Mobile Safari, setting `display: block` on temporal inputs causes the
@@ -181,13 +176,13 @@ input[type="search"] {
// set a pixel line-height that matches the given height of the input, but only // set a pixel line-height that matches the given height of the input, but only
// for Safari. See https://bugs.webkit.org/show_bug.cgi?id=139848 // for Safari. See https://bugs.webkit.org/show_bug.cgi?id=139848
// //
// Note that as of 8.3, iOS doesn't support `datetime` or `week`. // Note that as of 9.3, iOS doesn't support `week`.
@media screen and (-webkit-min-device-pixel-ratio: 0) { @media screen and (-webkit-min-device-pixel-ratio: 0) {
input[type="date"], input[type='date'],
input[type="time"], input[type='time'],
input[type="datetime-local"], input[type='datetime-local'],
input[type="month"] { input[type='month'] {
&.form-control { &.form-control {
line-height: @input-height-base; line-height: @input-height-base;
} }
@@ -204,7 +199,6 @@ input[type="search"] {
} }
} }
// Form groups // Form groups
// //
// Designed to help with the organization and spacing of vertical forms. For // Designed to help with the organization and spacing of vertical forms. For
@@ -214,7 +208,6 @@ input[type="search"] {
margin-bottom: @form-group-margin-bottom; margin-bottom: @form-group-margin-bottom;
} }
// Checkboxes and radios // Checkboxes and radios
// //
// Indent the labels to position radios/checkboxes as hanging controls. // Indent the labels to position radios/checkboxes as hanging controls.
@@ -234,10 +227,10 @@ input[type="search"] {
cursor: pointer; cursor: pointer;
} }
} }
.radio input[type="radio"], .radio input[type='radio'],
.radio-inline input[type="radio"], .radio-inline input[type='radio'],
.checkbox input[type="checkbox"], .checkbox input[type='checkbox'],
.checkbox-inline input[type="checkbox"] { .checkbox-inline input[type='checkbox'] {
position: absolute; position: absolute;
margin-left: -20px; margin-left: -20px;
margin-top: 4px \9; margin-top: 4px \9;
@@ -269,8 +262,8 @@ input[type="search"] {
// Some special care is needed because <label>s don't inherit their parent's `cursor`. // Some special care is needed because <label>s don't inherit their parent's `cursor`.
// //
// Note: Neither radios nor checkboxes can be readonly. // Note: Neither radios nor checkboxes can be readonly.
input[type="radio"], input[type='radio'],
input[type="checkbox"] { input[type='checkbox'] {
&[disabled], &[disabled],
&.disabled, &.disabled,
fieldset[disabled] & { fieldset[disabled] & {
@@ -296,7 +289,6 @@ input[type="checkbox"] {
} }
} }
// Static form control text // Static form control text
// //
// Apply class to a `p` element to make any string of text align with labels in // Apply class to a `p` element to make any string of text align with labels in
@@ -317,7 +309,6 @@ input[type="checkbox"] {
} }
} }
// Form control sizing // Form control sizing
// //
// Build on `.form-control` with modifier classes to decrease or increase the // Build on `.form-control` with modifier classes to decrease or increase the
@@ -382,7 +373,6 @@ input[type="checkbox"] {
} }
} }
// Form control feedback states // Form control feedback states
// //
// Apply contextual and semantic states to individual form controls. // Apply contextual and semantic states to individual form controls.
@@ -437,7 +427,6 @@ input[type="checkbox"] {
// Reposition feedback icon if input has visible label above // Reposition feedback icon if input has visible label above
.has-feedback label { .has-feedback label {
& ~ .form-control-feedback { & ~ .form-control-feedback {
top: (@line-height-computed + 5); // Height of the `label` and its margin top: (@line-height-computed + 5); // Height of the `label` and its margin
} }
@@ -446,7 +435,6 @@ input[type="checkbox"] {
} }
} }
// Help text // Help text
// //
// Apply to any element you wish to create light text for placement immediately // Apply to any element you wish to create light text for placement immediately
@@ -459,7 +447,6 @@ input[type="checkbox"] {
color: lighten(@text-color, 25%); // lighten the text some for contrast color: lighten(@text-color, 25%); // lighten the text some for contrast
} }
// Inline forms // Inline forms
// //
// Make forms appear inline(-block) by adding the `.form-inline` class. Inline // Make forms appear inline(-block) by adding the `.form-inline` class. Inline
@@ -472,7 +459,6 @@ input[type="checkbox"] {
// Heads up! This is mixin-ed into `.navbar-form` in navbars.less. // Heads up! This is mixin-ed into `.navbar-form` in navbars.less.
.form-inline { .form-inline {
// Kick in the inline // Kick in the inline
@media (min-width: @screen-sm-min) { @media (min-width: @screen-sm-min) {
// Inline-block all the things for "inline" // Inline-block all the things for "inline"
@@ -528,8 +514,8 @@ input[type="checkbox"] {
padding-left: 0; padding-left: 0;
} }
} }
.radio input[type="radio"], .radio input[type='radio'],
.checkbox input[type="checkbox"] { .checkbox input[type='checkbox'] {
position: relative; position: relative;
margin-left: 0; margin-left: 0;
} }
@@ -541,14 +527,12 @@ input[type="checkbox"] {
} }
} }
// Horizontal forms // Horizontal forms
// //
// Horizontal forms are built on grid classes and allow you to create forms with // Horizontal forms are built on grid classes and allow you to create forms with
// labels on the left and inputs on the right. // labels on the left and inputs on the right.
.form-horizontal { .form-horizontal {
// Consistent vertical alignment of radios and checkboxes // Consistent vertical alignment of radios and checkboxes
// //
// Labels also get some reset styles, but that is scoped to a media query below. // Labels also get some reset styles, but that is scoped to a media query below.

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,6 @@
// Grid system // Grid system
// -------------------------------------------------- // --------------------------------------------------
// Container widths // Container widths
// //
// Set the container width, and override it for fixed navbars in media queries. // Set the container width, and override it for fixed navbars in media queries.
@@ -21,7 +20,6 @@
} }
} }
// Fluid container // Fluid container
// //
// Utilizes the mixin meant for fixed width containers, but without any defined // Utilizes the mixin meant for fixed width containers, but without any defined
@@ -31,7 +29,6 @@
.container-fixed(); .container-fixed();
} }
// Row // Row
// //
// Rows contain and clear the floats of your columns. // Rows contain and clear the floats of your columns.
@@ -40,14 +37,12 @@
.make-row(); .make-row();
} }
// Columns // Columns
// //
// Common styles for small and large grid columns // Common styles for small and large grid columns
.make-grid-columns(); .make-grid-columns();
// Extra small grid // Extra small grid
// //
// Columns, offsets, pushes, and pulls for extra small devices like // Columns, offsets, pushes, and pulls for extra small devices like
@@ -55,7 +50,6 @@
.make-grid(xs); .make-grid(xs);
// Small grid // Small grid
// //
// Columns, offsets, pushes, and pulls for the small device range, from phones // Columns, offsets, pushes, and pulls for the small device range, from phones
@@ -65,7 +59,6 @@
.make-grid(sm); .make-grid(sm);
} }
// Medium grid // Medium grid
// //
// Columns, offsets, pushes, and pulls for the desktop device range. // Columns, offsets, pushes, and pulls for the desktop device range.
@@ -74,7 +67,6 @@
.make-grid(md); .make-grid(md);
} }
// Large grid // Large grid
// //
// Columns, offsets, pushes, and pulls for the large desktop device range. // Columns, offsets, pushes, and pulls for the large desktop device range.

View File

@@ -10,7 +10,7 @@
border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table
// Undo padding and float of grid classes // Undo padding and float of grid classes
&[class*="col-"] { &[class*='col-'] {
float: none; float: none;
padding-left: 0; padding-left: 0;
padding-right: 0; padding-right: 0;
@@ -52,7 +52,6 @@
.input-sm(); .input-sm();
} }
// Display as table-cell // Display as table-cell
// ------------------------- // -------------------------
.input-group-addon, .input-group-addon,
@@ -98,8 +97,8 @@
} }
// Nuke default margins from checkboxes and radios to vertically center within. // Nuke default margins from checkboxes and radios to vertically center within.
input[type="radio"], input[type='radio'],
input[type="checkbox"] { input[type='checkbox'] {
margin-top: 0; margin-top: 0;
} }
} }

View File

@@ -2,7 +2,6 @@
// Jumbotron // Jumbotron
// -------------------------------------------------- // --------------------------------------------------
.jumbotron { .jumbotron {
padding-top: @jumbotron-padding; padding-top: @jumbotron-padding;
padding-bottom: @jumbotron-padding; padding-bottom: @jumbotron-padding;

View File

@@ -4,7 +4,7 @@
.label { .label {
display: inline; display: inline;
padding: .2em .6em .3em; padding: 0.2em 0.6em 0.3em;
font-size: 75%; font-size: 75%;
font-weight: bold; font-weight: bold;
line-height: 1; line-height: 1;
@@ -12,7 +12,7 @@
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
vertical-align: baseline; vertical-align: baseline;
border-radius: .25em; border-radius: 0.25em;
// Add hover effects, but only for links // Add hover effects, but only for links
a& { a& {

View File

@@ -2,7 +2,6 @@
// List groups // List groups
// -------------------------------------------------- // --------------------------------------------------
// Base class // Base class
// //
// Easily usable on <ul>, <ol>, or <div>. // Easily usable on <ul>, <ol>, or <div>.
@@ -13,7 +12,6 @@
padding-left: 0; // reset padding because ul and ol padding-left: 0; // reset padding because ul and ol
} }
// Individual list items // Individual list items
// //
// Use on `li`s or `div`s within the `.list-group` parent. // Use on `li`s or `div`s within the `.list-group` parent.
@@ -37,7 +35,6 @@
} }
} }
// Interactive list items // Interactive list items
// //
// Use anchor or button elements instead of `li`s or `div`s to create interactive items. // Use anchor or button elements instead of `li`s or `div`s to create interactive items.
@@ -104,7 +101,6 @@ button.list-group-item {
} }
} }
// Contextual variants // Contextual variants
// //
// Add modifier classes to change text and background color on individual items. // Add modifier classes to change text and background color on individual items.
@@ -115,7 +111,6 @@ button.list-group-item {
.list-group-item-variant(warning; @state-warning-bg; @state-warning-text); .list-group-item-variant(warning; @state-warning-bg; @state-warning-text);
.list-group-item-variant(danger; @state-danger-bg; @state-danger-text); .list-group-item-variant(danger; @state-danger-bg; @state-danger-text);
// Custom content options // Custom content options
// //
// Extra classes for creating well-formatted content within `.list-group-item`s. // Extra classes for creating well-formatted content within `.list-group-item`s.

View File

@@ -2,39 +2,39 @@
// -------------------------------------------------- // --------------------------------------------------
// Utilities // Utilities
@import "mixins/hide-text.less"; @import 'mixins/hide-text.less';
@import "mixins/opacity.less"; @import 'mixins/opacity.less';
@import "mixins/image.less"; @import 'mixins/image.less';
@import "mixins/labels.less"; @import 'mixins/labels.less';
@import "mixins/reset-filter.less"; @import 'mixins/reset-filter.less';
@import "mixins/resize.less"; @import 'mixins/resize.less';
@import "mixins/responsive-visibility.less"; @import 'mixins/responsive-visibility.less';
@import "mixins/size.less"; @import 'mixins/size.less';
@import "mixins/tab-focus.less"; @import 'mixins/tab-focus.less';
@import "mixins/reset-text.less"; @import 'mixins/reset-text.less';
@import "mixins/text-emphasis.less"; @import 'mixins/text-emphasis.less';
@import "mixins/text-overflow.less"; @import 'mixins/text-overflow.less';
@import "mixins/vendor-prefixes.less"; @import 'mixins/vendor-prefixes.less';
// Components // Components
@import "mixins/alerts.less"; @import 'mixins/alerts.less';
@import "mixins/buttons.less"; @import 'mixins/buttons.less';
@import "mixins/panels.less"; @import 'mixins/panels.less';
@import "mixins/pagination.less"; @import 'mixins/pagination.less';
@import "mixins/list-group.less"; @import 'mixins/list-group.less';
@import "mixins/nav-divider.less"; @import 'mixins/nav-divider.less';
@import "mixins/forms.less"; @import 'mixins/forms.less';
@import "mixins/progress-bar.less"; @import 'mixins/progress-bar.less';
@import "mixins/table-row.less"; @import 'mixins/table-row.less';
// Skins // Skins
@import "mixins/background-variant.less"; @import 'mixins/background-variant.less';
@import "mixins/border-radius.less"; @import 'mixins/border-radius.less';
@import "mixins/gradients.less"; @import 'mixins/gradients.less';
// Layout // Layout
@import "mixins/clearfix.less"; @import 'mixins/clearfix.less';
@import "mixins/center-block.less"; @import 'mixins/center-block.less';
@import "mixins/nav-vertical-align.less"; @import 'mixins/nav-vertical-align.less';
@import "mixins/grid-framework.less"; @import 'mixins/grid-framework.less';
@import "mixins/grid.less"; @import 'mixins/grid.less';

View File

@@ -13,7 +13,7 @@
.clearfix() { .clearfix() {
&:before, &:before,
&:after { &:after {
content: " "; // 1 content: ' '; // 1
display: table; // 2 display: table; // 2
} }
&:after { &:after {

View File

@@ -20,10 +20,10 @@
// Set the border and box shadow on specific inputs to match // Set the border and box shadow on specific inputs to match
.form-control { .form-control {
border-color: @border-color; border-color: @border-color;
.box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work .box-shadow(inset 0 1px 1px rgba(0,0,0,0.075)); // Redeclare so transitions work
&:focus { &:focus {
border-color: darken(@border-color, 10%); border-color: darken(@border-color, 10%);
@shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%); @shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px lighten(@border-color, 20%);
.box-shadow(@shadow); .box-shadow(@shadow);
} }
} }
@@ -39,7 +39,6 @@
} }
} }
// Form control focus state // Form control focus state
// //
// Generate a customized focus state and for any input with the specified color, // Generate a customized focus state and for any input with the specified color,
@@ -53,11 +52,11 @@
// Example usage: change the default blue border and shadow to white for better // Example usage: change the default blue border and shadow to white for better
// contrast against a dark gray background. // contrast against a dark gray background.
.form-control-focus(@color: @input-border-focus) { .form-control-focus(@color: @input-border-focus) {
@color-rgba: rgba(red(@color), green(@color), blue(@color), .6); @color-rgba: rgba(red(@color), green(@color), blue(@color), 0.6);
&:focus { &:focus {
border-color: @color; border-color: @color;
outline: 0; outline: 0;
.box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}"); .box-shadow(~'inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}');
} }
} }

View File

@@ -1,17 +1,34 @@
// Gradients // Gradients
#gradient { #gradient {
// Horizontal gradient, from left to right // Horizontal gradient, from left to right
// //
// Creates two color stops, start and end, by specifying a color and position for each color stop. // Creates two color stops, start and end, by specifying a color and position for each color stop.
// Color stops are not available in IE9 and below. // Color stops are not available in IE9 and below.
.horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) { .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {
background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+ background-image: -webkit-linear-gradient(
background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12 left,
background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+ @start-color @start-percent,
@end-color @end-percent
); // Safari 5.1-6, Chrome 10+
background-image: -o-linear-gradient(
left,
@start-color @start-percent,
@end-color @end-percent
); // Opera 12
background-image: linear-gradient(
to right,
@start-color @start-percent,
@end-color @end-percent
); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
background-repeat: repeat-x; background-repeat: repeat-x;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down filter: e(
%(
"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",
argb(@start-color),
argb(@end-color)
)
); // IE9 and down
} }
// Vertical gradient, from top to bottom // Vertical gradient, from top to bottom
@@ -19,41 +36,111 @@
// Creates two color stops, start and end, by specifying a color and position for each color stop. // Creates two color stops, start and end, by specifying a color and position for each color stop.
// Color stops are not available in IE9 and below. // Color stops are not available in IE9 and below.
.vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) { .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {
background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+ background-image: -webkit-linear-gradient(
background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12 top,
background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+ @start-color @start-percent,
@end-color @end-percent
); // Safari 5.1-6, Chrome 10+
background-image: -o-linear-gradient(
top,
@start-color @start-percent,
@end-color @end-percent
); // Opera 12
background-image: linear-gradient(
to bottom,
@start-color @start-percent,
@end-color @end-percent
); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
background-repeat: repeat-x; background-repeat: repeat-x;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down filter: e(
%(
"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",
argb(@start-color),
argb(@end-color)
)
); // IE9 and down
} }
.directional(@start-color: #555; @end-color: #333; @deg: 45deg) { .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {
background-repeat: repeat-x; background-repeat: repeat-x;
background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+ background-image: -webkit-linear-gradient(
@deg,
@start-color,
@end-color
); // Safari 5.1-6, Chrome 10+
background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12 background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12
background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+ background-image: linear-gradient(
@deg,
@start-color,
@end-color
); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
} }
.horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) { .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {
background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color); background-image: -webkit-linear-gradient(
left,
@start-color,
@mid-color @color-stop,
@end-color
);
background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color); background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);
background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color); background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);
background-repeat: no-repeat; background-repeat: no-repeat;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback filter: e(
%(
"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",
argb(@start-color),
argb(@end-color)
)
); // IE9 and down, gets no color-stop at all for proper fallback
} }
.vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) { .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {
background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color); background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);
background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color); background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);
background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color); background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);
background-repeat: no-repeat; background-repeat: no-repeat;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback filter: e(
%(
"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",
argb(@start-color),
argb(@end-color)
)
); // IE9 and down, gets no color-stop at all for proper fallback
} }
.radial(@inner-color: #555; @outer-color: #333) { .radial(@inner-color: #555; @outer-color: #333) {
background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color); background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);
background-image: radial-gradient(circle, @inner-color, @outer-color); background-image: radial-gradient(circle, @inner-color, @outer-color);
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.striped(@color: rgba(255,255,255,.15); @angle: 45deg) { .striped(@color: rgba(255,255,255,0.15); @angle: 45deg) {
background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent); background-image: -webkit-linear-gradient(
background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent); @angle,
background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent); @color 25%,
transparent 25%,
transparent 50%,
@color 50%,
@color 75%,
transparent 75%,
transparent
);
background-image: -o-linear-gradient(
@angle,
@color 25%,
transparent 25%,
transparent 50%,
@color 50%,
@color 75%,
transparent 75%,
transparent
);
background-image: linear-gradient(
@angle,
@color 25%,
transparent 25%,
transparent 50%,
@color 50%,
@color 75%,
transparent 75%,
transparent
);
} }
} }

View File

@@ -5,15 +5,18 @@
.make-grid-columns() { .make-grid-columns() {
// Common styles for all sizes of grid columns, widths 1-12 // Common styles for all sizes of grid columns, widths 1-12
.col(@index) { // initial .col(@index) {
@item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}"; // initial
@item: ~'.col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}';
.col((@index + 1), @item); .col((@index + 1), @item);
} }
.col(@index, @list) when (@index =< @grid-columns) { // general; "=<" isn't a typo .col(@index, @list) when (@index =< @grid-columns) {
@item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}"; // general; "=<" isn't a typo
.col((@index + 1), ~"@{list}, @{item}"); @item: ~'.col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}';
.col((@index + 1), ~'@{list}, @{item}');
} }
.col(@index, @list) when (@index > @grid-columns) { // terminal .col(@index, @list) when (@index > @grid-columns) {
// terminal
@{list} { @{list} {
position: relative; position: relative;
// Prevent columns from collapsing when empty // Prevent columns from collapsing when empty
@@ -27,15 +30,18 @@
} }
.float-grid-columns(@class) { .float-grid-columns(@class) {
.col(@index) { // initial .col(@index) {
@item: ~".col-@{class}-@{index}"; // initial
@item: ~'.col-@{class}-@{index}';
.col((@index + 1), @item); .col((@index + 1), @item);
} }
.col(@index, @list) when (@index =< @grid-columns) { // general .col(@index, @list) when (@index =< @grid-columns) {
@item: ~".col-@{class}-@{index}"; // general
.col((@index + 1), ~"@{list}, @{item}"); @item: ~'.col-@{class}-@{index}';
.col((@index + 1), ~'@{list}, @{item}');
} }
.col(@index, @list) when (@index > @grid-columns) { // terminal .col(@index, @list) when (@index > @grid-columns) {
// terminal
@{list} { @{list} {
float: left; float: left;
} }

View File

@@ -8,7 +8,7 @@
// Deprecated as of v3.0.1 (has been removed in v4) // Deprecated as of v3.0.1 (has been removed in v4)
.hide-text() { .hide-text() {
font: ~"0/0" a; font: ~'0/0' a;
color: transparent; color: transparent;
text-shadow: none; text-shadow: none;
background-color: transparent; background-color: transparent;

View File

@@ -2,7 +2,6 @@
// - Responsive image // - Responsive image
// - Retina image // - Retina image
// Responsive image // Responsive image
// //
// Keep images from scaling beyond the width of their parents. // Keep images from scaling beyond the width of their parents.
@@ -12,22 +11,20 @@
height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
} }
// Retina image // Retina image
// //
// Short retina mixin for setting background-image and -size. Note that the // Short retina mixin for setting background-image and -size. Note that the
// spelling of `min--moz-device-pixel-ratio` is intentional. // spelling of `min--moz-device-pixel-ratio` is intentional.
.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) { .img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {
background-image: url("@{file-1x}"); background-image: url('@{file-1x}');
@media @media only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and (min--moz-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2),
only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (-o-min-device-pixel-ratio: 2/1),
only screen and (min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2),
only screen and (min-resolution: 192dpi), only screen and (min-resolution: 192dpi),
only screen and (min-resolution: 2dppx) { only screen and (min-resolution: 2dppx) {
background-image: url("@{file-2x}"); background-image: url('@{file-2x}');
background-size: @width-1x @height-1x; background-size: @width-1x @height-1x;
} }
} }

View File

@@ -4,5 +4,5 @@
opacity: @opacity; opacity: @opacity;
// IE8 filter // IE8 filter
@opacity-ie: (@opacity * 100); @opacity-ie: (@opacity * 100);
filter: ~"alpha(opacity=@{opacity-ie})"; filter: ~'alpha(opacity=@{opacity-ie})';
} }

View File

@@ -4,5 +4,5 @@
// the IE filter for IE9 and below. // the IE filter for IE9 and below.
.reset-filter() { .reset-filter() {
filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)")); filter: e(%('progid:DXImageTransform.Microsoft.gradient(enabled = false)'));
} }

View File

@@ -4,10 +4,16 @@
// More easily include all the states for responsive-utilities.less. // More easily include all the states for responsive-utilities.less.
.responsive-visibility() { .responsive-visibility() {
display: block !important; display: block !important;
table& { display: table !important; } table& {
tr& { display: table-row !important; } display: table !important;
}
tr& {
display: table-row !important;
}
th&, th&,
td& { display: table-cell !important; } td& {
display: table-cell !important;
}
} }
.responsive-invisibility() { .responsive-invisibility() {

View File

@@ -1,9 +1,9 @@
// WebKit-style focus // WebKit-style focus
.tab-focus() { .tab-focus() {
// Default // WebKit-specific. Other browsers will keep their default outline style.
outline: thin dotted; // (Initially tried to also force default via `outline: initial`,
// WebKit // but that seems to erroneously remove the outline in Firefox altogether.)
outline: 5px auto -webkit-focus-ring-color; outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px; outline-offset: -2px;
} }

View File

@@ -14,7 +14,6 @@
// - Transitions // - Transitions
// - User Select // - User Select
// Animations // Animations
.animation(@animation) { .animation(@animation) {
-webkit-animation: @animation; -webkit-animation: @animation;
@@ -104,8 +103,12 @@
color: @color; color: @color;
opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526 opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526
} }
&:-ms-input-placeholder { color: @color; } // Internet Explorer 10+ &:-ms-input-placeholder {
&::-webkit-input-placeholder { color: @color; } // Safari and Chrome color: @color;
} // Internet Explorer 10+
&::-webkit-input-placeholder {
color: @color;
} // Safari and Chrome
} }
// Transformations // Transformations
@@ -184,7 +187,6 @@
transform-origin: @origin; transform-origin: @origin;
} }
// Transitions // Transitions
.transition(@transition) { .transition(@transition) {
@@ -215,7 +217,6 @@
transition: transform @transition; transition: transform @transition;
} }
// User select // User select
// For selecting text on the page // For selecting text on the page

View File

@@ -31,9 +31,11 @@
// When fading in the modal, animate it to slide down // When fading in the modal, animate it to slide down
&.fade .modal-dialog { &.fade .modal-dialog {
.translate(0, -25%); .translate(0, -25%);
.transition-transform(~"0.3s ease-out"); .transition-transform(~'0.3s ease-out');
}
&.in .modal-dialog {
.translate(0, 0);
} }
&.in .modal-dialog { .translate(0, 0) }
} }
.modal-open .modal { .modal-open .modal {
overflow-x: hidden; overflow-x: hidden;
@@ -54,7 +56,7 @@
border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc) border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc)
border: 1px solid @modal-content-border-color; border: 1px solid @modal-content-border-color;
border-radius: @border-radius-large; border-radius: @border-radius-large;
.box-shadow(0 3px 9px rgba(0,0,0,.5)); .box-shadow(0 3px 9px rgba(0,0,0,0.5));
background-clip: padding-box; background-clip: padding-box;
// Remove focus outline from opened modal // Remove focus outline from opened modal
outline: 0; outline: 0;
@@ -70,8 +72,12 @@
z-index: @zindex-modal-background; z-index: @zindex-modal-background;
background-color: @modal-backdrop-bg; background-color: @modal-backdrop-bg;
// Fade for backdrop // Fade for backdrop
&.fade { .opacity(0); } &.fade {
&.in { .opacity(@modal-backdrop-opacity); } .opacity(0);
}
&.in {
.opacity(@modal-backdrop-opacity);
}
} }
// Modal header // Modal header
@@ -138,13 +144,17 @@
margin: 30px auto; margin: 30px auto;
} }
.modal-content { .modal-content {
.box-shadow(0 5px 15px rgba(0,0,0,.5)); .box-shadow(0 5px 15px rgba(0,0,0,0.5));
} }
// Modal sizes // Modal sizes
.modal-sm { width: @modal-sm; } .modal-sm {
width: @modal-sm;
}
} }
@media (min-width: @screen-md-min) { @media (min-width: @screen-md-min) {
.modal-lg { width: @modal-lg; } .modal-lg {
width: @modal-lg;
}
} }

View File

@@ -2,7 +2,6 @@
// Navbars // Navbars
// -------------------------------------------------- // --------------------------------------------------
// Wrapper and base class // Wrapper and base class
// //
// Provide a static navbar from which we expand to create full-width, fixed, and // Provide a static navbar from which we expand to create full-width, fixed, and
@@ -22,7 +21,6 @@
} }
} }
// Navbar heading // Navbar heading
// //
// Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy // Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy
@@ -36,7 +34,6 @@
} }
} }
// Navbar collapse (body) // Navbar collapse (body)
// //
// Group your navbar content into this for easy collapsing and expanding across // Group your navbar content into this for easy collapsing and expanding across
@@ -52,7 +49,7 @@
padding-right: @navbar-padding-horizontal; padding-right: @navbar-padding-horizontal;
padding-left: @navbar-padding-horizontal; padding-left: @navbar-padding-horizontal;
border-top: 1px solid transparent; border-top: 1px solid transparent;
box-shadow: inset 0 1px 0 rgba(255,255,255,.1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
&:extend(.clearfix all); &:extend(.clearfix all);
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
@@ -98,7 +95,6 @@
} }
} }
// Both navbar header and collapse // Both navbar header and collapse
// //
// When a container is present, change the behavior of the header and collapse. // When a container is present, change the behavior of the header and collapse.
@@ -117,7 +113,6 @@
} }
} }
// //
// Navbar alignment options // Navbar alignment options
// //
@@ -157,7 +152,6 @@
border-width: 1px 0 0; border-width: 1px 0 0;
} }
// Brand/project name // Brand/project name
.navbar-brand { .navbar-brand {
@@ -184,7 +178,6 @@
} }
} }
// Navbar toggle // Navbar toggle
// //
// Custom button for toggling the `.navbar-collapse`, powered by the collapse // Custom button for toggling the `.navbar-collapse`, powered by the collapse
@@ -223,7 +216,6 @@
} }
} }
// Navbar nav links // Navbar nav links
// //
// Builds on top of the `.nav` components with its own modifier class to make // Builds on top of the `.nav` components with its own modifier class to make
@@ -277,7 +269,6 @@
} }
} }
// Navbar form // Navbar form
// //
// Extension of the `.form-inline` with some extra flavor for optimum display in // Extension of the `.form-inline` with some extra flavor for optimum display in
@@ -289,7 +280,7 @@
padding: 10px @navbar-padding-horizontal; padding: 10px @navbar-padding-horizontal;
border-top: 1px solid transparent; border-top: 1px solid transparent;
border-bottom: 1px solid transparent; border-bottom: 1px solid transparent;
@shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1); @shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
.box-shadow(@shadow); .box-shadow(@shadow);
// Mixin behavior for optimum display // Mixin behavior for optimum display
@@ -320,7 +311,6 @@
} }
} }
// Dropdown menus // Dropdown menus
// Menu position and menu carets // Menu position and menu carets
@@ -335,7 +325,6 @@
.border-bottom-radius(0); .border-bottom-radius(0);
} }
// Buttons in navbars // Buttons in navbars
// //
// Vertically center a button within a navbar (when *not* in a form). // Vertically center a button within a navbar (when *not* in a form).
@@ -351,7 +340,6 @@
} }
} }
// Text in navbars // Text in navbars
// //
// Add a class to make any element properly align itself vertically within the navbars. // Add a class to make any element properly align itself vertically within the navbars.
@@ -366,7 +354,6 @@
} }
} }
// Component alignment // Component alignment
// //
// Repurpose the pull utilities as their own navbar utilities to avoid specificity // Repurpose the pull utilities as their own navbar utilities to avoid specificity
@@ -376,7 +363,9 @@
// Declared after the navbar components to ensure more specificity on the margins. // Declared after the navbar components to ensure more specificity on the margins.
@media (min-width: @grid-float-breakpoint) { @media (min-width: @grid-float-breakpoint) {
.navbar-left { .pull-left(); } .navbar-left {
.pull-left();
}
.navbar-right { .navbar-right {
.pull-right(); .pull-right();
margin-right: -@navbar-padding-horizontal; margin-right: -@navbar-padding-horizontal;
@@ -387,7 +376,6 @@
} }
} }
// Alternate navbars // Alternate navbars
// -------------------------------------------------- // --------------------------------------------------
@@ -496,7 +484,6 @@
} }
} }
// Links in navbars // Links in navbars
// //
// Add a class to ensure links outside the navbar nav are colored correctly. // Add a class to ensure links outside the navbar nav are colored correctly.

View File

@@ -2,7 +2,6 @@
// Navs // Navs
// -------------------------------------------------- // --------------------------------------------------
// Base class // Base class
// -------------------------------------------------- // --------------------------------------------------
@@ -68,7 +67,6 @@
} }
} }
// Tabs // Tabs
// ------------------------- // -------------------------
@@ -87,7 +85,8 @@
border: 1px solid transparent; border: 1px solid transparent;
border-radius: @border-radius-base @border-radius-base 0 0; border-radius: @border-radius-base @border-radius-base 0 0;
&:hover { &:hover {
border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color; border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color
@nav-tabs-border-color;
} }
} }
@@ -111,7 +110,6 @@
} }
} }
// Pills // Pills
// ------------------------- // -------------------------
.nav-pills { .nav-pills {
@@ -138,7 +136,6 @@
} }
} }
// Stacked pills // Stacked pills
.nav-stacked { .nav-stacked {
> li { > li {
@@ -150,7 +147,6 @@
} }
} }
// Nav variations // Nav variations
// -------------------------------------------------- // --------------------------------------------------
@@ -215,7 +211,6 @@
} }
} }
// Tabbable tabs // Tabbable tabs
// ------------------------- // -------------------------
@@ -229,7 +224,6 @@
} }
} }
// Dropdowns // Dropdowns
// ------------------------- // -------------------------

View File

@@ -331,8 +331,8 @@ input {
// 2. Remove excess padding in IE 8/9/10. // 2. Remove excess padding in IE 8/9/10.
// //
input[type="checkbox"], input[type='checkbox'],
input[type="radio"] { input[type='radio'] {
box-sizing: border-box; // 1 box-sizing: border-box; // 1
padding: 0; // 2 padding: 0; // 2
} }
@@ -343,8 +343,8 @@ input[type="radio"] {
// decrement button to change from `default` to `text`. // decrement button to change from `default` to `text`.
// //
input[type="number"]::-webkit-inner-spin-button, input[type='number']::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { input[type='number']::-webkit-outer-spin-button {
height: auto; height: auto;
} }
@@ -353,7 +353,7 @@ input[type="number"]::-webkit-outer-spin-button {
// 2. Address `box-sizing` set to `border-box` in Safari and Chrome. // 2. Address `box-sizing` set to `border-box` in Safari and Chrome.
// //
input[type="search"] { input[type='search'] {
-webkit-appearance: textfield; // 1 -webkit-appearance: textfield; // 1
box-sizing: content-box; //2 box-sizing: content-box; //2
} }
@@ -364,8 +364,8 @@ input[type="search"] {
// padding (and `textfield` appearance). // padding (and `textfield` appearance).
// //
input[type="search"]::-webkit-search-cancel-button, input[type='search']::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration { input[type='search']::-webkit-search-decoration {
-webkit-appearance: none; -webkit-appearance: none;
} }

View File

@@ -2,7 +2,6 @@
// Pager pagination // Pager pagination
// -------------------------------------------------- // --------------------------------------------------
.pager { .pager {
padding-left: 0; padding-left: 0;
margin: @line-height-computed 0; margin: @line-height-computed 0;

View File

@@ -2,14 +2,13 @@
// Panels // Panels
// -------------------------------------------------- // --------------------------------------------------
// Base class // Base class
.panel { .panel {
margin-bottom: @line-height-computed; margin-bottom: @line-height-computed;
background-color: @panel-bg; background-color: @panel-bg;
border: 1px solid transparent; border: 1px solid transparent;
border-radius: @panel-border-radius; border-radius: @panel-border-radius;
.box-shadow(0 1px 1px rgba(0,0,0,.05)); .box-shadow(0 1px 1px rgba(0,0,0,0.05));
} }
// Panel contents // Panel contents
@@ -53,7 +52,6 @@
.border-bottom-radius((@panel-border-radius - 1)); .border-bottom-radius((@panel-border-radius - 1));
} }
// List groups in panels // List groups in panels
// //
// By default, space out list group content from panel headings to account for // By default, space out list group content from panel headings to account for
@@ -213,8 +211,7 @@
} }
} }
// Collapsible panels (aka, accordion)
// Collapsable panels (aka, accordion)
// //
// Wrap a series of panels in `.panel-group` to turn them into an accordion with // Wrap a series of panels in `.panel-group` to turn them into an accordion with
// the help of our collapse JavaScript plugin. // the help of our collapse JavaScript plugin.
@@ -249,7 +246,6 @@
} }
} }
// Contextual variations // Contextual variations
.panel-default { .panel-default {
.panel-variant(@panel-default-border; @panel-default-text; @panel-default-heading-bg; @panel-default-border); .panel-variant(@panel-default-border; @panel-default-text; @panel-default-heading-bg; @panel-default-border);

View File

@@ -2,7 +2,6 @@
// Popovers // Popovers
// -------------------------------------------------- // --------------------------------------------------
.popover { .popover {
position: absolute; position: absolute;
top: 0; top: 0;
@@ -21,13 +20,21 @@
border: 1px solid @popover-fallback-border-color; border: 1px solid @popover-fallback-border-color;
border: 1px solid @popover-border-color; border: 1px solid @popover-border-color;
border-radius: @border-radius-large; border-radius: @border-radius-large;
.box-shadow(0 5px 10px rgba(0,0,0,.2)); .box-shadow(0 5px 10px rgba(0,0,0,0.2));
// Offset the popover to account for the popover arrow // Offset the popover to account for the popover arrow
&.top { margin-top: -@popover-arrow-width; } &.top {
&.right { margin-left: @popover-arrow-width; } margin-top: -@popover-arrow-width;
&.bottom { margin-top: @popover-arrow-width; } }
&.left { margin-left: -@popover-arrow-width; } &.right {
margin-left: @popover-arrow-width;
}
&.bottom {
margin-top: @popover-arrow-width;
}
&.left {
margin-left: -@popover-arrow-width;
}
} }
.popover-title { .popover-title {
@@ -63,7 +70,7 @@
} }
.popover > .arrow:after { .popover > .arrow:after {
border-width: @popover-arrow-width; border-width: @popover-arrow-width;
content: ""; content: '';
} }
.popover { .popover {
@@ -75,7 +82,7 @@
border-top-color: @popover-arrow-outer-color; border-top-color: @popover-arrow-outer-color;
bottom: -@popover-arrow-outer-width; bottom: -@popover-arrow-outer-width;
&:after { &:after {
content: " "; content: ' ';
bottom: 1px; bottom: 1px;
margin-left: -@popover-arrow-width; margin-left: -@popover-arrow-width;
border-bottom-width: 0; border-bottom-width: 0;
@@ -90,7 +97,7 @@
border-right-color: @popover-arrow-outer-fallback-color; // IE8 fallback border-right-color: @popover-arrow-outer-fallback-color; // IE8 fallback
border-right-color: @popover-arrow-outer-color; border-right-color: @popover-arrow-outer-color;
&:after { &:after {
content: " "; content: ' ';
left: 1px; left: 1px;
bottom: -@popover-arrow-width; bottom: -@popover-arrow-width;
border-left-width: 0; border-left-width: 0;
@@ -105,7 +112,7 @@
border-bottom-color: @popover-arrow-outer-color; border-bottom-color: @popover-arrow-outer-color;
top: -@popover-arrow-outer-width; top: -@popover-arrow-outer-width;
&:after { &:after {
content: " "; content: ' ';
top: 1px; top: 1px;
margin-left: -@popover-arrow-width; margin-left: -@popover-arrow-width;
border-top-width: 0; border-top-width: 0;
@@ -121,7 +128,7 @@
border-left-color: @popover-arrow-outer-fallback-color; // IE8 fallback border-left-color: @popover-arrow-outer-fallback-color; // IE8 fallback
border-left-color: @popover-arrow-outer-color; border-left-color: @popover-arrow-outer-color;
&:after { &:after {
content: " "; content: ' ';
right: 1px; right: 1px;
border-right-width: 0; border-right-width: 0;
border-left-color: @popover-arrow-color; border-left-color: @popover-arrow-color;

View File

@@ -21,18 +21,18 @@
} }
a[href]:after { a[href]:after {
content: " (" attr(href) ")"; content: ' (' attr(href) ')';
} }
abbr[title]:after { abbr[title]:after {
content: " (" attr(title) ")"; content: ' (' attr(title) ')';
} }
// Don't show links that are fragment identifiers, // Don't show links that are fragment identifiers,
// or use the `javascript:` pseudo protocol // or use the `javascript:` pseudo protocol
a[href^="#"]:after, a[href^='#']:after,
a[href^="javascript:"]:after { a[href^='javascript:']:after {
content: ""; content: '';
} }
pre, pre,

View File

@@ -2,22 +2,28 @@
// Progress bars // Progress bars
// -------------------------------------------------- // --------------------------------------------------
// Bar animations // Bar animations
// ------------------------- // -------------------------
// WebKit // WebKit
@-webkit-keyframes progress-bar-stripes { @-webkit-keyframes progress-bar-stripes {
from { background-position: 40px 0; } from {
to { background-position: 0 0; } background-position: 40px 0;
}
to {
background-position: 0 0;
}
} }
// Spec and IE10+ // Spec and IE10+
@keyframes progress-bar-stripes { @keyframes progress-bar-stripes {
from { background-position: 40px 0; } from {
to { background-position: 0 0; } background-position: 40px 0;
}
to {
background-position: 0 0;
}
} }
// Bar itself // Bar itself
// ------------------------- // -------------------------
@@ -29,7 +35,7 @@
margin-bottom: @line-height-computed; margin-bottom: @line-height-computed;
background-color: @progress-bg; background-color: @progress-bg;
border-radius: @progress-border-radius; border-radius: @progress-border-radius;
.box-shadow(inset 0 1px 2px rgba(0,0,0,.1)); .box-shadow(inset 0 1px 2px rgba(0,0,0,0.1));
} }
// Bar of progress // Bar of progress
@@ -42,8 +48,8 @@
color: @progress-bar-color; color: @progress-bar-color;
text-align: center; text-align: center;
background-color: @progress-bar-bg; background-color: @progress-bar-bg;
.box-shadow(inset 0 -1px 0 rgba(0,0,0,.15)); .box-shadow(inset 0 -1px 0 rgba(0,0,0,0.15));
.transition(width .6s ease); .transition(width 0.6s ease);
} }
// Striped bars // Striped bars
@@ -66,7 +72,6 @@
.animation(progress-bar-stripes 2s linear infinite); .animation(progress-bar-stripes 2s linear infinite);
} }
// Variations // Variations
// ------------------------- // -------------------------

View File

@@ -2,7 +2,6 @@
// Responsive: Utility classes // Responsive: Utility classes
// -------------------------------------------------- // --------------------------------------------------
// IE10 in Windows (Phone) 8 // IE10 in Windows (Phone) 8
// //
// Support for responsive views via media queries is kind of borked in IE10, for // Support for responsive views via media queries is kind of borked in IE10, for
@@ -22,7 +21,6 @@
width: device-width; width: device-width;
} }
// Visibility utilities // Visibility utilities
// Note: Deprecated .visible-xs, .visible-sm, .visible-md, and .visible-lg as of v3.2.0 // Note: Deprecated .visible-xs, .visible-sm, .visible-md, and .visible-lg as of v3.2.0
.visible-xs, .visible-xs,
@@ -152,7 +150,6 @@
} }
} }
// Print utilities // Print utilities
// //
// Media queries are placed on the inside to be mixin-friendly. // Media queries are placed on the inside to be mixin-friendly.

View File

@@ -2,7 +2,6 @@
// Scaffolding // Scaffolding
// -------------------------------------------------- // --------------------------------------------------
// Reset the box-sizing // Reset the box-sizing
// //
// Heads up! This reset may cause conflicts with some third-party widgets. // Heads up! This reset may cause conflicts with some third-party widgets.
@@ -16,7 +15,6 @@
.box-sizing(border-box); .box-sizing(border-box);
} }
// Body reset // Body reset
html { html {
@@ -42,7 +40,6 @@ textarea {
line-height: inherit; line-height: inherit;
} }
// Links // Links
a { a {
@@ -60,7 +57,6 @@ a {
} }
} }
// Figures // Figures
// //
// We reset this here because previously Normalize had no `figure` margins. This // We reset this here because previously Normalize had no `figure` margins. This
@@ -70,7 +66,6 @@ figure {
margin: 0; margin: 0;
} }
// Images // Images
img { img {
@@ -96,7 +91,7 @@ img {
background-color: @thumbnail-bg; background-color: @thumbnail-bg;
border: 1px solid @thumbnail-border; border: 1px solid @thumbnail-border;
border-radius: @thumbnail-border-radius; border-radius: @thumbnail-border-radius;
.transition(all .2s ease-in-out); .transition(all 0.2s ease-in-out);
// Keep them at most 100% wide // Keep them at most 100% wide
.img-responsive(inline-block); .img-responsive(inline-block);
@@ -107,7 +102,6 @@ img {
border-radius: 50%; // set radius in percents border-radius: 50%; // set radius in percents
} }
// Horizontal rules // Horizontal rules
hr { hr {
@@ -117,10 +111,9 @@ hr {
border-top: 1px solid @hr-border; border-top: 1px solid @hr-border;
} }
// Only display content to screen readers // Only display content to screen readers
// //
// See: http://a11yproject.com/posts/how-to-hide-content/ // See: http://a11yproject.com/posts/how-to-hide-content
.sr-only { .sr-only {
position: absolute; position: absolute;
@@ -149,13 +142,12 @@ hr {
} }
} }
// iOS "clickable elements" fix for role="button" // iOS "clickable elements" fix for role="button"
// //
// Fixes "clickability" issue (and more generally, the firing of events such as focus as well) // Fixes "clickability" issue (and more generally, the firing of events such as focus as well)
// for traditionally non-focusable elements with role="button" // for traditionally non-focusable elements with role="button"
// see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile // see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
[role="button"] { [role='button'] {
cursor: pointer; cursor: pointer;
} }

View File

@@ -2,7 +2,6 @@
// Tables // Tables
// -------------------------------------------------- // --------------------------------------------------
table { table {
background-color: @table-bg; background-color: @table-bg;
} }
@@ -16,7 +15,6 @@ th {
text-align: left; text-align: left;
} }
// Baseline styles // Baseline styles
.table { .table {
@@ -64,7 +62,6 @@ th {
} }
} }
// Condensed table w/ half padding // Condensed table w/ half padding
.table-condensed { .table-condensed {
@@ -80,7 +77,6 @@ th {
} }
} }
// Bordered version // Bordered version
// //
// Add borders all around the table and between all the columns. // Add borders all around the table and between all the columns.
@@ -105,7 +101,6 @@ th {
} }
} }
// Zebra-striping // Zebra-striping
// //
// Default zebra-stripe styles (alternating gray and transparent backgrounds) // Default zebra-stripe styles (alternating gray and transparent backgrounds)
@@ -116,7 +111,6 @@ th {
} }
} }
// Hover effect // Hover effect
// //
// Placed here since it has to come after the potential zebra striping // Placed here since it has to come after the potential zebra striping
@@ -127,12 +121,11 @@ th {
} }
} }
// Table cell sizing // Table cell sizing
// //
// Reset default table behavior // Reset default table behavior
table col[class*="col-"] { table col[class*='col-'] {
position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623) position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)
float: none; float: none;
display: table-column; display: table-column;
@@ -140,7 +133,7 @@ table col[class*="col-"] {
table { table {
td, td,
th { th {
&[class*="col-"] { &[class*='col-'] {
position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623) position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)
float: none; float: none;
display: table-cell; display: table-cell;
@@ -148,7 +141,6 @@ table {
} }
} }
// Table backgrounds // Table backgrounds
// //
// Exact selectors below required to override `.table-striped` and prevent // Exact selectors below required to override `.table-striped` and prevent
@@ -161,7 +153,6 @@ table {
.table-row-variant(warning; @state-warning-bg); .table-row-variant(warning; @state-warning-bg);
.table-row-variant(danger; @state-danger-bg); .table-row-variant(danger; @state-danger-bg);
// Responsive tables // Responsive tables
// //
// Wrap your tables in `.table-responsive` and we'll make them mobile friendly // Wrap your tables in `.table-responsive` and we'll make them mobile friendly
@@ -228,7 +219,6 @@ table {
} }
} }
} }
} }
} }
} }

View File

@@ -1,6 +1,6 @@
/*! /*!
* Bootstrap v3.3.6 (http://getbootstrap.com) * Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc. * Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */
@@ -8,9 +8,8 @@
// Load core variables and mixins // Load core variables and mixins
// -------------------------------------------------- // --------------------------------------------------
@import "variables.less"; @import 'variables.less';
@import "mixins.less"; @import 'mixins.less';
// //
// Buttons // Buttons
@@ -23,14 +22,14 @@
.btn-info, .btn-info,
.btn-warning, .btn-warning,
.btn-danger { .btn-danger {
text-shadow: 0 -1px 0 rgba(0,0,0,.2); text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
@shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075); @shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);
.box-shadow(@shadow); .box-shadow(@shadow);
// Reset the shadow // Reset the shadow
&:active, &:active,
&.active { &.active {
.box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); .box-shadow(inset 0 3px 5px rgba(0,0,0,0.125));
} }
&.disabled, &.disabled,
@@ -46,7 +45,7 @@
// Mixin for generating new styles // Mixin for generating new styles
.btn-styles(@btn-color: #555) { .btn-styles(@btn-color: #555) {
#gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%)); #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));;
.reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners; see https://github.com/twbs/bootstrap/issues/10620 .reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners; see https://github.com/twbs/bootstrap/issues/10620
background-repeat: repeat-x; background-repeat: repeat-x;
border-color: darken(@btn-color, 14%); border-color: darken(@btn-color, 14%);
@@ -88,13 +87,26 @@
} }
// Apply the mixin to the buttons // Apply the mixin to the buttons
.btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; } .btn-default {
.btn-primary { .btn-styles(@btn-primary-bg); } .btn-styles(@btn-default-bg);
.btn-success { .btn-styles(@btn-success-bg); } text-shadow: 0 1px 0 #fff;
.btn-info { .btn-styles(@btn-info-bg); } border-color: #ccc;
.btn-warning { .btn-styles(@btn-warning-bg); } }
.btn-danger { .btn-styles(@btn-danger-bg); } .btn-primary {
.btn-styles(@btn-primary-bg);
}
.btn-success {
.btn-styles(@btn-success-bg);
}
.btn-info {
.btn-styles(@btn-info-bg);
}
.btn-warning {
.btn-styles(@btn-warning-bg);
}
.btn-danger {
.btn-styles(@btn-danger-bg);
}
// //
// Images // Images
@@ -102,64 +114,62 @@
.thumbnail, .thumbnail,
.img-thumbnail { .img-thumbnail {
.box-shadow(0 1px 2px rgba(0,0,0,.075)); .box-shadow(0 1px 2px rgba(0,0,0,0.075));
} }
// //
// Dropdowns // Dropdowns
// -------------------------------------------------- // --------------------------------------------------
.dropdown-menu > li > a:hover, .dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus { .dropdown-menu > li > a:focus {
#gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%)); #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));;
background-color: darken(@dropdown-link-hover-bg, 5%); background-color: darken(@dropdown-link-hover-bg, 5%);
} }
.dropdown-menu > .active > a, .dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus { .dropdown-menu > .active > a:focus {
#gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%)); #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));;
background-color: darken(@dropdown-link-active-bg, 5%); background-color: darken(@dropdown-link-active-bg, 5%);
} }
// //
// Navbar // Navbar
// -------------------------------------------------- // --------------------------------------------------
// Default navbar // Default navbar
.navbar-default { .navbar-default {
#gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg); #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg);;
.reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered
border-radius: @navbar-border-radius; border-radius: @navbar-border-radius;
@shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075); @shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);
.box-shadow(@shadow); .box-shadow(@shadow);
.navbar-nav > .open > a, .navbar-nav > .open > a,
.navbar-nav > .active > a { .navbar-nav > .active > a {
#gradient > .vertical(@start-color: darken(@navbar-default-link-active-bg, 5%); @end-color: darken(@navbar-default-link-active-bg, 2%)); #gradient > .vertical(@start-color: darken(@navbar-default-link-active-bg, 5%); @end-color: darken(@navbar-default-link-active-bg, 2%));;
.box-shadow(inset 0 3px 9px rgba(0,0,0,.075)); .box-shadow(inset 0 3px 9px rgba(0,0,0,0.075));
} }
} }
.navbar-brand, .navbar-brand,
.navbar-nav > li > a { .navbar-nav > li > a {
text-shadow: 0 1px 0 rgba(255,255,255,.25); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
} }
// Inverted navbar // Inverted navbar
.navbar-inverse { .navbar-inverse {
#gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg); #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);;
.reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered; see https://github.com/twbs/bootstrap/issues/10257 .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered; see https://github.com/twbs/bootstrap/issues/10257
border-radius: @navbar-border-radius; border-radius: @navbar-border-radius;
.navbar-nav > .open > a, .navbar-nav > .open > a,
.navbar-nav > .active > a { .navbar-nav > .active > a {
#gradient > .vertical(@start-color: @navbar-inverse-link-active-bg; @end-color: lighten(@navbar-inverse-link-active-bg, 2.5%)); #gradient > .vertical(@start-color: @navbar-inverse-link-active-bg; @end-color: lighten(@navbar-inverse-link-active-bg, 2.5%));;
.box-shadow(inset 0 3px 9px rgba(0,0,0,.25)); .box-shadow(inset 0 3px 9px rgba(0,0,0,0.25));
} }
.navbar-brand, .navbar-brand,
.navbar-nav > li > a { .navbar-nav > li > a {
text-shadow: 0 -1px 0 rgba(0,0,0,.25); text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
} }
} }
@@ -177,35 +187,41 @@
&:hover, &:hover,
&:focus { &:focus {
color: #fff; color: #fff;
#gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%)); #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));;
} }
} }
} }
// //
// Alerts // Alerts
// -------------------------------------------------- // --------------------------------------------------
// Common styles // Common styles
.alert { .alert {
text-shadow: 0 1px 0 rgba(255,255,255,.2); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
@shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05); @shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
.box-shadow(@shadow); .box-shadow(@shadow);
} }
// Mixin for generating new styles // Mixin for generating new styles
.alert-styles(@color) { .alert-styles(@color) {
#gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%)); #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));;
border-color: darken(@color, 15%); border-color: darken(@color, 15%);
} }
// Apply the mixin to the alerts // Apply the mixin to the alerts
.alert-success { .alert-styles(@alert-success-bg); } .alert-success {
.alert-info { .alert-styles(@alert-info-bg); } .alert-styles(@alert-success-bg);
.alert-warning { .alert-styles(@alert-warning-bg); } }
.alert-danger { .alert-styles(@alert-danger-bg); } .alert-info {
.alert-styles(@alert-info-bg);
}
.alert-warning {
.alert-styles(@alert-warning-bg);
}
.alert-danger {
.alert-styles(@alert-danger-bg);
}
// //
// Progress bars // Progress bars
@@ -213,20 +229,30 @@
// Give the progress background some depth // Give the progress background some depth
.progress { .progress {
#gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg) #gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg);;
} }
// Mixin for generating new styles // Mixin for generating new styles
.progress-bar-styles(@color) { .progress-bar-styles(@color) {
#gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%)); #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));;
} }
// Apply the mixin to the progress bars // Apply the mixin to the progress bars
.progress-bar { .progress-bar-styles(@progress-bar-bg); } .progress-bar {
.progress-bar-success { .progress-bar-styles(@progress-bar-success-bg); } .progress-bar-styles(@progress-bar-bg);
.progress-bar-info { .progress-bar-styles(@progress-bar-info-bg); } }
.progress-bar-warning { .progress-bar-styles(@progress-bar-warning-bg); } .progress-bar-success {
.progress-bar-danger { .progress-bar-styles(@progress-bar-danger-bg); } .progress-bar-styles(@progress-bar-success-bg);
}
.progress-bar-info {
.progress-bar-styles(@progress-bar-info-bg);
}
.progress-bar-warning {
.progress-bar-styles(@progress-bar-warning-bg);
}
.progress-bar-danger {
.progress-bar-styles(@progress-bar-danger-bg);
}
// Reset the striped class because our mixins don't do multiple gradients and // Reset the striped class because our mixins don't do multiple gradients and
// the above custom styles override the new `.progress-bar-striped` in v3.2.0. // the above custom styles override the new `.progress-bar-striped` in v3.2.0.
@@ -234,20 +260,19 @@
#gradient > .striped(); #gradient > .striped();
} }
// //
// List groups // List groups
// -------------------------------------------------- // --------------------------------------------------
.list-group { .list-group {
border-radius: @border-radius-base; border-radius: @border-radius-base;
.box-shadow(0 1px 2px rgba(0,0,0,.075)); .box-shadow(0 1px 2px rgba(0,0,0,0.075));
} }
.list-group-item.active, .list-group-item.active,
.list-group-item.active:hover, .list-group-item.active:hover,
.list-group-item.active:focus { .list-group-item.active:focus {
text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%); text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);
#gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%)); #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));;
border-color: darken(@list-group-active-border, 7.5%); border-color: darken(@list-group-active-border, 7.5%);
.badge { .badge {
@@ -255,37 +280,47 @@
} }
} }
// //
// Panels // Panels
// -------------------------------------------------- // --------------------------------------------------
// Common styles // Common styles
.panel { .panel {
.box-shadow(0 1px 2px rgba(0,0,0,.05)); .box-shadow(0 1px 2px rgba(0,0,0,0.05));
} }
// Mixin for generating new styles // Mixin for generating new styles
.panel-heading-styles(@color) { .panel-heading-styles(@color) {
#gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%)); #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));;
} }
// Apply the mixin to the panel headings only // Apply the mixin to the panel headings only
.panel-default > .panel-heading { .panel-heading-styles(@panel-default-heading-bg); } .panel-default > .panel-heading {
.panel-primary > .panel-heading { .panel-heading-styles(@panel-primary-heading-bg); } .panel-heading-styles(@panel-default-heading-bg);
.panel-success > .panel-heading { .panel-heading-styles(@panel-success-heading-bg); } }
.panel-info > .panel-heading { .panel-heading-styles(@panel-info-heading-bg); } .panel-primary > .panel-heading {
.panel-warning > .panel-heading { .panel-heading-styles(@panel-warning-heading-bg); } .panel-heading-styles(@panel-primary-heading-bg);
.panel-danger > .panel-heading { .panel-heading-styles(@panel-danger-heading-bg); } }
.panel-success > .panel-heading {
.panel-heading-styles(@panel-success-heading-bg);
}
.panel-info > .panel-heading {
.panel-heading-styles(@panel-info-heading-bg);
}
.panel-warning > .panel-heading {
.panel-heading-styles(@panel-warning-heading-bg);
}
.panel-danger > .panel-heading {
.panel-heading-styles(@panel-danger-heading-bg);
}
// //
// Wells // Wells
// -------------------------------------------------- // --------------------------------------------------
.well { .well {
#gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg); #gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg);;
border-color: darken(@well-bg, 10%); border-color: darken(@well-bg, 10%);
@shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1); @shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);
.box-shadow(@shadow); .box-shadow(@shadow);
} }

View File

@@ -2,7 +2,6 @@
// Thumbnails // Thumbnails
// -------------------------------------------------- // --------------------------------------------------
// Mixin and adjust the regular image class // Mixin and adjust the regular image class
.thumbnail { .thumbnail {
display: block; display: block;
@@ -12,7 +11,7 @@
background-color: @thumbnail-bg; background-color: @thumbnail-bg;
border: 1px solid @thumbnail-border; border: 1px solid @thumbnail-border;
border-radius: @thumbnail-border-radius; border-radius: @thumbnail-border-radius;
.transition(border .2s ease-in-out); .transition(border 0.2s ease-in-out);
> img, > img,
a > img { a > img {

View File

@@ -2,7 +2,6 @@
// Tooltips // Tooltips
// -------------------------------------------------- // --------------------------------------------------
// Base class // Base class
.tooltip { .tooltip {
position: absolute; position: absolute;
@@ -15,11 +14,25 @@
.opacity(0); .opacity(0);
&.in { .opacity(@tooltip-opacity); } &.in {
&.top { margin-top: -3px; padding: @tooltip-arrow-width 0; } .opacity(@tooltip-opacity);
&.right { margin-left: 3px; padding: 0 @tooltip-arrow-width; } }
&.bottom { margin-top: 3px; padding: @tooltip-arrow-width 0; } &.top {
&.left { margin-left: -3px; padding: 0 @tooltip-arrow-width; } margin-top: -3px;
padding: @tooltip-arrow-width 0;
}
&.right {
margin-left: 3px;
padding: 0 @tooltip-arrow-width;
}
&.bottom {
margin-top: 3px;
padding: @tooltip-arrow-width 0;
}
&.left {
margin-left: -3px;
padding: 0 @tooltip-arrow-width;
}
} }
// Wrapper for the tooltip content // Wrapper for the tooltip content

View File

@@ -2,12 +2,21 @@
// Typography // Typography
// -------------------------------------------------- // --------------------------------------------------
// Headings // Headings
// ------------------------- // -------------------------
h1, h2, h3, h4, h5, h6, h1,
.h1, .h2, .h3, .h4, .h5, .h6 { h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
font-family: @headings-font-family; font-family: @headings-font-family;
font-weight: @headings-font-weight; font-weight: @headings-font-weight;
line-height: @headings-line-height; line-height: @headings-line-height;
@@ -21,9 +30,12 @@ h1, h2, h3, h4, h5, h6,
} }
} }
h1, .h1, h1,
h2, .h2, .h1,
h3, .h3 { h2,
.h2,
h3,
.h3 {
margin-top: @line-height-computed; margin-top: @line-height-computed;
margin-bottom: (@line-height-computed / 2); margin-bottom: (@line-height-computed / 2);
@@ -32,9 +44,12 @@ h3, .h3 {
font-size: 65%; font-size: 65%;
} }
} }
h4, .h4, h4,
h5, .h5, .h4,
h6, .h6 { h5,
.h5,
h6,
.h6 {
margin-top: (@line-height-computed / 2); margin-top: (@line-height-computed / 2);
margin-bottom: (@line-height-computed / 2); margin-bottom: (@line-height-computed / 2);
@@ -44,13 +59,30 @@ h6, .h6 {
} }
} }
h1, .h1 { font-size: @font-size-h1; } h1,
h2, .h2 { font-size: @font-size-h2; } .h1 {
h3, .h3 { font-size: @font-size-h3; } font-size: @font-size-h1;
h4, .h4 { font-size: @font-size-h4; } }
h5, .h5 { font-size: @font-size-h5; } h2,
h6, .h6 { font-size: @font-size-h6; } .h2 {
font-size: @font-size-h2;
}
h3,
.h3 {
font-size: @font-size-h3;
}
h4,
.h4 {
font-size: @font-size-h4;
}
h5,
.h5 {
font-size: @font-size-h5;
}
h6,
.h6 {
font-size: @font-size-h6;
}
// Body text // Body text
// ------------------------- // -------------------------
@@ -70,7 +102,6 @@ p {
} }
} }
// Emphasis & misc // Emphasis & misc
// ------------------------- // -------------------------
@@ -83,20 +114,36 @@ small,
mark, mark,
.mark { .mark {
background-color: @state-warning-bg; background-color: @state-warning-bg;
padding: .2em; padding: 0.2em;
} }
// Alignment // Alignment
.text-left { text-align: left; } .text-left {
.text-right { text-align: right; } text-align: left;
.text-center { text-align: center; } }
.text-justify { text-align: justify; } .text-right {
.text-nowrap { white-space: nowrap; } text-align: right;
}
.text-center {
text-align: center;
}
.text-justify {
text-align: justify;
}
.text-nowrap {
white-space: nowrap;
}
// Transformation // Transformation
.text-lowercase { text-transform: lowercase; } .text-lowercase {
.text-uppercase { text-transform: uppercase; } text-transform: lowercase;
.text-capitalize { text-transform: capitalize; } }
.text-uppercase {
text-transform: uppercase;
}
.text-capitalize {
text-transform: capitalize;
}
// Contextual colors // Contextual colors
.text-muted { .text-muted {
@@ -140,7 +187,6 @@ mark,
.bg-variant(@state-danger-bg); .bg-variant(@state-danger-bg);
} }
// Page header // Page header
// ------------------------- // -------------------------
@@ -150,7 +196,6 @@ mark,
border-bottom: 1px solid @page-header-border-color; border-bottom: 1px solid @page-header-border-color;
} }
// Lists // Lists
// ------------------------- // -------------------------
@@ -225,7 +270,6 @@ dd {
} }
} }
// Misc // Misc
// ------------------------- // -------------------------
@@ -287,7 +331,9 @@ blockquote.pull-right {
footer, footer,
small, small,
.small { .small {
&:before { content: ''; } &:before {
content: '';
}
&:after { &:after {
content: '\00A0 \2014'; // nbsp, em dash content: '\00A0 \2014'; // nbsp, em dash
} }

View File

@@ -2,7 +2,6 @@
// Utility classes // Utility classes
// -------------------------------------------------- // --------------------------------------------------
// Floats // Floats
// ------------------------- // -------------------------
@@ -19,7 +18,6 @@
float: left !important; float: left !important;
} }
// Toggling content // Toggling content
// ------------------------- // -------------------------
@@ -37,7 +35,6 @@
.text-hide(); .text-hide();
} }
// Hide from screenreaders and browsers // Hide from screenreaders and browsers
// //
// Credit: HTML5 Boilerplate // Credit: HTML5 Boilerplate
@@ -46,7 +43,6 @@
display: none !important; display: none !important;
} }
// For Affix plugin // For Affix plugin
// ------------------------- // -------------------------

View File

@@ -2,7 +2,6 @@
// Variables // Variables
// -------------------------------------------------- // --------------------------------------------------
//== Colors //== Colors
// //
//## Gray and brand colors for use across Bootstrap. //## Gray and brand colors for use across Bootstrap.
@@ -20,7 +19,6 @@
@brand-warning: #f0ad4e; @brand-warning: #f0ad4e;
@brand-danger: #d9534f; @brand-danger: #d9534f;
//== Scaffolding //== Scaffolding
// //
//## Settings for some of the most global styles. //## Settings for some of the most global styles.
@@ -37,15 +35,14 @@
//** Link hover decoration. //** Link hover decoration.
@link-hover-decoration: underline; @link-hover-decoration: underline;
//== Typography //== Typography
// //
//## Font, line-height, and color for body text, headings, and more. //## Font, line-height, and color for body text, headings, and more.
@font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif; @font-family-sans-serif: 'Helvetica Neue', Helvetica, Arial, sans-serif;
@font-family-serif: Georgia, "Times New Roman", Times, serif; @font-family-serif: Georgia, 'Times New Roman', Times, serif;
//** Default monospace fonts for `<code>`, `<kbd>`, and `<pre>`. //** Default monospace fonts for `<code>`, `<kbd>`, and `<pre>`.
@font-family-monospace: Menlo, Monaco, Consolas, "Courier New", monospace; @font-family-monospace: Menlo, Monaco, Consolas, 'Courier New', monospace;
@font-family-base: @font-family-sans-serif; @font-family-base: @font-family-sans-serif;
@font-size-base: 14px; @font-size-base: 14px;
@@ -70,18 +67,16 @@
@headings-line-height: 1.1; @headings-line-height: 1.1;
@headings-color: inherit; @headings-color: inherit;
//== Iconography //== Iconography
// //
//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower. //## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
//** Load fonts from this directory. //** Load fonts from this directory.
@icon-font-path: "../fonts/"; @icon-font-path: '../fonts/';
//** File name for all font files. //** File name for all font files.
@icon-font-name: "glyphicons-halflings-regular"; @icon-font-name: 'glyphicons-halflings-regular';
//** Element ID within SVG icon file. //** Element ID within SVG icon file.
@icon-font-svg-id: "glyphicons_halflingsregular"; @icon-font-svg-id: 'glyphicons_halflingsregular';
//== Components //== Components
// //
@@ -111,12 +106,11 @@
//** Global background color for active items (e.g., navs or dropdowns). //** Global background color for active items (e.g., navs or dropdowns).
@component-active-bg: @brand-primary; @component-active-bg: @brand-primary;
//** Width of the `border` for generating carets that indicator dropdowns. //** Width of the `border` for generating carets that indicate dropdowns.
@caret-width-base: 4px; @caret-width-base: 4px;
//** Carets increase slightly in size for larger components. //** Carets increase slightly in size for larger components.
@caret-width-large: 5px; @caret-width-large: 5px;
//== Tables //== Tables
// //
//## Customizes the `.table` component with basic values, each used across all table variations. //## Customizes the `.table` component with basic values, each used across all table variations.
@@ -137,7 +131,6 @@
//** Border color for table and cell borders. //** Border color for table and cell borders.
@table-border-color: #ddd; @table-border-color: #ddd;
//== Buttons //== Buttons
// //
//## For each of Bootstrap's buttons, define text, background and border color. //## For each of Bootstrap's buttons, define text, background and border color.
@@ -175,7 +168,6 @@
@btn-border-radius-large: @border-radius-large; @btn-border-radius-large: @border-radius-large;
@btn-border-radius-small: @border-radius-small; @btn-border-radius-small: @border-radius-small;
//== Forms //== Forms
// //
//## //##
@@ -208,9 +200,13 @@
//** Default `.form-control` height //** Default `.form-control` height
@input-height-base: (@line-height-computed + (@padding-base-vertical * 2) + 2); @input-height-base: (@line-height-computed + (@padding-base-vertical * 2) + 2);
//** Large `.form-control` height //** Large `.form-control` height
@input-height-large: (ceil(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2); @input-height-large: (
ceil(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2
);
//** Small `.form-control` height //** Small `.form-control` height
@input-height-small: (floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 2); @input-height-small: (
floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 2
);
//** `.form-group` margin //** `.form-group` margin
@form-group-margin-bottom: 15px; @form-group-margin-bottom: 15px;
@@ -226,7 +222,6 @@
//** Disabled cursor for form controls and buttons. //** Disabled cursor for form controls and buttons.
@cursor-disabled: not-allowed; @cursor-disabled: not-allowed;
//== Dropdowns //== Dropdowns
// //
//## Dropdown menu container and contents. //## Dropdown menu container and contents.
@@ -234,7 +229,7 @@
//** Background for the dropdown menu. //** Background for the dropdown menu.
@dropdown-bg: #fff; @dropdown-bg: #fff;
//** Dropdown menu `border-color`. //** Dropdown menu `border-color`.
@dropdown-border: rgba(0,0,0,.15); @dropdown-border: rgba(0, 0, 0, 0.15);
//** Dropdown menu `border-color` **for IE8**. //** Dropdown menu `border-color` **for IE8**.
@dropdown-fallback-border: #ccc; @dropdown-fallback-border: #ccc;
//** Divider color for between dropdown items. //** Divider color for between dropdown items.
@@ -261,7 +256,6 @@
//** Deprecated `@dropdown-caret-color` as of v3.1.0 //** Deprecated `@dropdown-caret-color` as of v3.1.0
@dropdown-caret-color: #000; @dropdown-caret-color: #000;
//-- Z-index master list //-- Z-index master list
// //
// Warning: Avoid customizing these values. They're used for a bird's eye view // Warning: Avoid customizing these values. They're used for a bird's eye view
@@ -277,7 +271,6 @@
@zindex-modal-background: 1040; @zindex-modal-background: 1040;
@zindex-modal: 1050; @zindex-modal: 1050;
//== Media queries breakpoints //== Media queries breakpoints
// //
//## Define the breakpoints at which your layout will change, adapting to different screen sizes. //## Define the breakpoints at which your layout will change, adapting to different screen sizes.
@@ -316,7 +309,6 @@
@screen-sm-max: (@screen-md-min - 1); @screen-sm-max: (@screen-md-min - 1);
@screen-md-max: (@screen-lg-min - 1); @screen-md-max: (@screen-lg-min - 1);
//== Grid system //== Grid system
// //
//## Define your custom responsive grid. //## Define your custom responsive grid.
@@ -331,7 +323,6 @@
//** Point at which the navbar begins collapsing. //** Point at which the navbar begins collapsing.
@grid-float-breakpoint-max: (@grid-float-breakpoint - 1); @grid-float-breakpoint-max: (@grid-float-breakpoint - 1);
//== Container sizes //== Container sizes
// //
//## Define the maximum width of `.container` for different screen sizes. //## Define the maximum width of `.container` for different screen sizes.
@@ -351,7 +342,6 @@
//** For `@screen-lg-min` and up. //** For `@screen-lg-min` and up.
@container-lg: @container-large-desktop; @container-lg: @container-large-desktop;
//== Navbar //== Navbar
// //
//## //##
@@ -387,7 +377,6 @@
@navbar-default-toggle-icon-bar-bg: #888; @navbar-default-toggle-icon-bar-bg: #888;
@navbar-default-toggle-border-color: #ddd; @navbar-default-toggle-border-color: #ddd;
//=== Inverted navbar //=== Inverted navbar
// Reset inverted navbar basics // Reset inverted navbar basics
@navbar-inverse-color: lighten(@gray-light, 15%); @navbar-inverse-color: lighten(@gray-light, 15%);
@@ -413,7 +402,6 @@
@navbar-inverse-toggle-icon-bar-bg: #fff; @navbar-inverse-toggle-icon-bar-bg: #fff;
@navbar-inverse-toggle-border-color: #333; @navbar-inverse-toggle-border-color: #333;
//== Navs //== Navs
// //
//## //##
@@ -442,7 +430,6 @@
@nav-pills-active-link-hover-bg: @component-active-bg; @nav-pills-active-link-hover-bg: @component-active-bg;
@nav-pills-active-link-hover-color: @component-active-color; @nav-pills-active-link-hover-color: @component-active-color;
//== Pagination //== Pagination
// //
//## //##
@@ -463,7 +450,6 @@
@pagination-disabled-bg: #fff; @pagination-disabled-bg: #fff;
@pagination-disabled-border: #ddd; @pagination-disabled-border: #ddd;
//== Pager //== Pager
// //
//## //##
@@ -479,7 +465,6 @@
@pager-disabled-color: @pagination-disabled-color; @pager-disabled-color: @pagination-disabled-color;
//== Jumbotron //== Jumbotron
// //
//## //##
@@ -491,7 +476,6 @@
@jumbotron-font-size: ceil((@font-size-base * 1.5)); @jumbotron-font-size: ceil((@font-size-base * 1.5));
@jumbotron-heading-font-size: ceil((@font-size-base * 4.5)); @jumbotron-heading-font-size: ceil((@font-size-base * 4.5));
//== Form states and alerts //== Form states and alerts
// //
//## Define colors for form feedback states and, by default, alerts. //## Define colors for form feedback states and, by default, alerts.
@@ -512,7 +496,6 @@
@state-danger-bg: #f2dede; @state-danger-bg: #f2dede;
@state-danger-border: darken(spin(@state-danger-bg, -10), 5%); @state-danger-border: darken(spin(@state-danger-bg, -10), 5%);
//== Tooltips //== Tooltips
// //
//## //##
@@ -523,14 +506,13 @@
@tooltip-color: #fff; @tooltip-color: #fff;
//** Tooltip background color //** Tooltip background color
@tooltip-bg: #000; @tooltip-bg: #000;
@tooltip-opacity: .9; @tooltip-opacity: 0.9;
//** Tooltip arrow width //** Tooltip arrow width
@tooltip-arrow-width: 5px; @tooltip-arrow-width: 5px;
//** Tooltip arrow color //** Tooltip arrow color
@tooltip-arrow-color: @tooltip-bg; @tooltip-arrow-color: @tooltip-bg;
//== Popovers //== Popovers
// //
//## //##
@@ -540,7 +522,7 @@
//** Popover maximum width //** Popover maximum width
@popover-max-width: 276px; @popover-max-width: 276px;
//** Popover border color //** Popover border color
@popover-border-color: rgba(0,0,0,.2); @popover-border-color: rgba(0, 0, 0, 0.2);
//** Popover fallback border color //** Popover fallback border color
@popover-fallback-border-color: #ccc; @popover-fallback-border-color: #ccc;
@@ -559,7 +541,6 @@
//** Popover outer arrow fallback color //** Popover outer arrow fallback color
@popover-arrow-outer-fallback-color: darken(@popover-fallback-border-color, 20%); @popover-arrow-outer-fallback-color: darken(@popover-fallback-border-color, 20%);
//== Labels //== Labels
// //
//## //##
@@ -582,7 +563,6 @@
//** Default text color of a linked label //** Default text color of a linked label
@label-link-hover-color: #fff; @label-link-hover-color: #fff;
//== Modals //== Modals
// //
//## //##
@@ -598,14 +578,14 @@
//** Background color of modal content area //** Background color of modal content area
@modal-content-bg: #fff; @modal-content-bg: #fff;
//** Modal content border color //** Modal content border color
@modal-content-border-color: rgba(0,0,0,.2); @modal-content-border-color: rgba(0, 0, 0, 0.2);
//** Modal content border color **for IE8** //** Modal content border color **for IE8**
@modal-content-fallback-border-color: #999; @modal-content-fallback-border-color: #999;
//** Modal backdrop background color //** Modal backdrop background color
@modal-backdrop-bg: #000; @modal-backdrop-bg: #000;
//** Modal backdrop opacity //** Modal backdrop opacity
@modal-backdrop-opacity: .5; @modal-backdrop-opacity: 0.5;
//** Modal header border color //** Modal header border color
@modal-header-border-color: #e5e5e5; @modal-header-border-color: #e5e5e5;
//** Modal footer border color //** Modal footer border color
@@ -615,7 +595,6 @@
@modal-md: 600px; @modal-md: 600px;
@modal-sm: 300px; @modal-sm: 300px;
//== Alerts //== Alerts
// //
//## Define alert colors, border radius, and padding. //## Define alert colors, border radius, and padding.
@@ -640,7 +619,6 @@
@alert-danger-text: @state-danger-text; @alert-danger-text: @state-danger-text;
@alert-danger-border: @state-danger-border; @alert-danger-border: @state-danger-border;
//== Progress bars //== Progress bars
// //
//## //##
@@ -663,7 +641,6 @@
//** Info progress bar color //** Info progress bar color
@progress-bar-info-bg: @brand-info; @progress-bar-info-bg: @brand-info;
//== List group //== List group
// //
//## //##
@@ -697,7 +674,6 @@
@list-group-link-hover-color: @list-group-link-color; @list-group-link-hover-color: @list-group-link-color;
@list-group-link-heading-color: #333; @list-group-link-heading-color: #333;
//== Panels //== Panels
// //
//## //##
@@ -736,7 +712,6 @@
@panel-danger-border: @state-danger-border; @panel-danger-border: @state-danger-border;
@panel-danger-heading-bg: @state-danger-bg; @panel-danger-heading-bg: @state-danger-bg;
//== Thumbnails //== Thumbnails
// //
//## //##
@@ -755,7 +730,6 @@
//** Padding around the thumbnail caption //** Padding around the thumbnail caption
@thumbnail-caption-padding: 9px; @thumbnail-caption-padding: 9px;
//== Wells //== Wells
// //
//## //##
@@ -763,7 +737,6 @@
@well-bg: #f5f5f5; @well-bg: #f5f5f5;
@well-border: darken(@well-bg, 7%); @well-border: darken(@well-bg, 7%);
//== Badges //== Badges
// //
//## //##
@@ -782,7 +755,6 @@
@badge-line-height: 1; @badge-line-height: 1;
@badge-border-radius: 10px; @badge-border-radius: 10px;
//== Breadcrumbs //== Breadcrumbs
// //
//## //##
@@ -796,18 +768,17 @@
//** Text color of current page in the breadcrumb //** Text color of current page in the breadcrumb
@breadcrumb-active-color: @gray-light; @breadcrumb-active-color: @gray-light;
//** Textual separator for between breadcrumb elements //** Textual separator for between breadcrumb elements
@breadcrumb-separator: "/"; @breadcrumb-separator: '/';
//== Carousel //== Carousel
// //
//## //##
@carousel-text-shadow: 0 1px 2px rgba(0,0,0,.6); @carousel-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
@carousel-control-color: #fff; @carousel-control-color: #fff;
@carousel-control-width: 15%; @carousel-control-width: 15%;
@carousel-control-opacity: .5; @carousel-control-opacity: 0.5;
@carousel-control-font-size: 20px; @carousel-control-font-size: 20px;
@carousel-indicator-active-bg: #fff; @carousel-indicator-active-bg: #fff;
@@ -815,7 +786,6 @@
@carousel-caption-color: #fff; @carousel-caption-color: #fff;
//== Close //== Close
// //
//## //##
@@ -824,7 +794,6 @@
@close-color: #000; @close-color: #000;
@close-text-shadow: 0 1px 0 #fff; @close-text-shadow: 0 1px 0 #fff;
//== Code //== Code
// //
//## //##
@@ -840,7 +809,6 @@
@pre-border-color: #ccc; @pre-border-color: #ccc;
@pre-scrollable-max-height: 340px; @pre-scrollable-max-height: 340px;
//== Type //== Type
// //
//## //##

View File

@@ -2,7 +2,6 @@
// Wells // Wells
// -------------------------------------------------- // --------------------------------------------------
// Base class // Base class
.well { .well {
min-height: 20px; min-height: 20px;
@@ -11,10 +10,10 @@
background-color: @well-bg; background-color: @well-bg;
border: 1px solid @well-border; border: 1px solid @well-border;
border-radius: @border-radius-base; border-radius: @border-radius-base;
.box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); .box-shadow(inset 0 1px 1px rgba(0,0,0,0.05));
blockquote { blockquote {
border-color: #ddd; border-color: #ddd;
border-color: rgba(0,0,0,.15); border-color: rgba(0, 0, 0, 0.15);
} }
} }

View File

@@ -2,13 +2,13 @@
// Bootswatch // Bootswatch
// ----------------------------------------------------- // -----------------------------------------------------
@import url("http://fonts.googleapis.com/css?family=Roboto:300,400,500,700"); @import url('http://fonts.googleapis.com/css?family=Roboto:300,400,500,700');
// Navbar ===================================================================== // Navbar =====================================================================
.navbar { .navbar {
border: none; border: none;
.box-shadow(0 1px 2px rgba(0,0,0,.3)); .box-shadow(0 1px 2px rgba(0,0,0,0.3));
&-brand { &-brand {
font-size: 24px; font-size: 24px;
@@ -19,7 +19,7 @@
color: #fff; color: #fff;
.placeholder(@navbar-inverse-link-color); .placeholder(@navbar-inverse-link-color);
&[type=text] { &[type='text'] {
.box-shadow(inset 0 -1px 0 @navbar-inverse-link-color); .box-shadow(inset 0 -1px 0 @navbar-inverse-link-color);
&:focus { &:focus {
@@ -49,9 +49,9 @@
&:active { &:active {
background-color: darken(@bg, 6%); background-color: darken(@bg, 6%);
#gradient > .radial(darken(@bg, 6%) 10%, @bg 11%); #gradient > .radial(darken(@bg, 6%) 10%, @bg 11%);;
background-size: 1000%; background-size: 1000%;
.box-shadow(2px 2px 2px rgba(0,0,0,.3)); .box-shadow(2px 2px 2px rgba(0,0,0,0.3));
} }
} }
} }
@@ -67,7 +67,7 @@
text-transform: uppercase; text-transform: uppercase;
border-right: none; border-right: none;
border-bottom: none; border-bottom: none;
.box-shadow(1px 1px 2px rgba(0,0,0,.3)); .box-shadow(1px 1px 2px rgba(0,0,0,0.3));
.transition(all 0.2s); .transition(all 0.2s);
&-link { &-link {
@@ -107,7 +107,7 @@
body { body {
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
letter-spacing: .1px; letter-spacing: 0.1px;
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
} }
@@ -118,7 +118,7 @@ p {
input, input,
button { button {
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
letter-spacing: .1px; letter-spacing: 0.1px;
text-rendering: optimizeLegibility; text-rendering: optimizeLegibility;
} }
@@ -137,14 +137,14 @@ label {
textarea, textarea,
textarea.form-control, textarea.form-control,
input.form-control, input.form-control,
input[type=text], input[type='text'],
input[type=password], input[type='password'],
input[type=email], input[type='email'],
input[type=number], input[type='number'],
[type=text].form-control, [type='text'].form-control,
[type=password].form-control, [type='password'].form-control,
[type=email].form-control, [type='email'].form-control,
[type=tel].form-control, [type='tel'].form-control,
[contenteditable].form-control { [contenteditable].form-control {
padding: 0; padding: 0;
border: none; border: none;
@@ -223,15 +223,15 @@ select.form-control {
padding-left: 25px; padding-left: 25px;
} }
input[type="radio"], input[type='radio'],
input[type="checkbox"] { input[type='checkbox'] {
margin-left: -25px; margin-left: -25px;
} }
} }
input[type="radio"], input[type='radio'],
.radio input[type="radio"], .radio input[type='radio'],
.radio-inline input[type="radio"] { .radio-inline input[type='radio'] {
position: relative; position: relative;
margin-top: 5px; margin-top: 5px;
margin-right: 4px; margin-right: 4px;
@@ -248,7 +248,7 @@ input[type="radio"],
&:before, &:before,
&:after { &:after {
content: ""; content: '';
display: block; display: block;
width: 18px; width: 18px;
height: 18px; height: 18px;
@@ -287,9 +287,9 @@ input[type="radio"],
} }
} }
input[type="checkbox"], input[type='checkbox'],
.checkbox input[type="checkbox"], .checkbox input[type='checkbox'],
.checkbox-inline input[type="checkbox"] { .checkbox-inline input[type='checkbox'] {
position: relative; position: relative;
vertical-align: -4px; vertical-align: -4px;
border: none; border: none;
@@ -302,7 +302,7 @@ input[type="checkbox"],
} }
&:after { &:after {
content: ""; content: '';
display: block; display: block;
width: 18px; width: 18px;
height: 18px; height: 18px;
@@ -314,7 +314,7 @@ input[type="checkbox"],
} }
&:checked:before { &:checked:before {
content: ""; content: '';
position: absolute; position: absolute;
top: 0; top: 0;
left: 6px; left: 6px;
@@ -343,27 +343,27 @@ input[type="checkbox"],
} }
.has-warning { .has-warning {
input:not([type=checkbox]), input:not([type='checkbox']),
.form-control, .form-control,
input:not([type=checkbox]):focus, input:not([type='checkbox']):focus,
.form-control:focus { .form-control:focus {
.box-shadow(inset 0 -2px 0 @brand-warning); .box-shadow(inset 0 -2px 0 @brand-warning);
} }
} }
.has-error { .has-error {
input:not([type=checkbox]), input:not([type='checkbox']),
.form-control, .form-control,
input:not([type=checkbox]):focus, input:not([type='checkbox']):focus,
.form-control:focus { .form-control:focus {
.box-shadow(inset 0 -2px 0 @brand-danger); .box-shadow(inset 0 -2px 0 @brand-danger);
} }
} }
.has-success { .has-success {
input:not([type=checkbox]), input:not([type='checkbox']),
.form-control, .form-control,
input:not([type=checkbox]):focus, input:not([type='checkbox']):focus,
.form-control:focus { .form-control:focus {
.box-shadow(inset 0 -2px 0 @brand-success); .box-shadow(inset 0 -2px 0 @brand-success);
} }
@@ -405,7 +405,6 @@ input[type="checkbox"],
} }
&.nav-justified { &.nav-justified {
& > li > a, & > li > a,
& > li > a:hover, & > li > a:hover,
& > .active > a, & > .active > a,
@@ -421,7 +420,7 @@ input[type="checkbox"],
.dropdown-menu { .dropdown-menu {
border: none; border: none;
.box-shadow(0 1px 4px rgba(0,0,0,.3)); .box-shadow(0 1px 4px rgba(0,0,0,0.3));
} }
// Indicators ================================================================= // Indicators =================================================================
@@ -479,7 +478,7 @@ input[type="checkbox"],
&:last-child { &:last-child {
&:before { &:before {
display: block; display: block;
content: ""; content: '';
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 100%; height: 100%;
@@ -523,7 +522,6 @@ input[type="checkbox"],
} }
.list-group { .list-group {
&-item { &-item {
padding: 15px; padding: 15px;
} }
@@ -541,7 +539,7 @@ input[type="checkbox"],
.panel { .panel {
border: none; border: none;
border-radius: 2px; border-radius: 2px;
.box-shadow(0 1px 4px rgba(0,0,0,.3)); .box-shadow(0 1px 4px rgba(0,0,0,0.3));
&-heading { &-heading {
border-bottom: none; border-bottom: none;
@@ -554,14 +552,18 @@ input[type="checkbox"],
.popover { .popover {
border: none; border: none;
.box-shadow(0 1px 4px rgba(0,0,0,.3)); .box-shadow(0 1px 4px rgba(0,0,0,0.3));
} }
.carousel { .carousel {
&-caption { &-caption {
h1, h2, h3, h4, h5, h6 { h1,
h2,
h3,
h4,
h5,
h6 {
color: inherit; color: inherit;
} }
} }
} }

View File

@@ -2,7 +2,6 @@
// Variables // Variables
// -------------------------------------------------- // --------------------------------------------------
//== Colors //== Colors
// //
//## Gray and brand colors for use across Bootstrap. //## Gray and brand colors for use across Bootstrap.
@@ -14,13 +13,12 @@
@gray-light: #bbb; @gray-light: #bbb;
@gray-lighter: lighten(@gray-base, 93.5%); // #eee @gray-lighter: lighten(@gray-base, 93.5%); // #eee
@brand-primary: #2196F3; @brand-primary: #2196f3;
@brand-success: #4CAF50; @brand-success: #4caf50;
@brand-info: #9C27B0; @brand-info: #9c27b0;
@brand-warning: #ff9800; @brand-warning: #ff9800;
@brand-danger: #e51c23; @brand-danger: #e51c23;
//== Scaffolding //== Scaffolding
// //
//## Settings for some of the most global styles. //## Settings for some of the most global styles.
@@ -37,15 +35,14 @@
//** Link hover decoration. //** Link hover decoration.
@link-hover-decoration: underline; @link-hover-decoration: underline;
//== Typography //== Typography
// //
//## Font, line-height, and color for body text, headings, and more. //## Font, line-height, and color for body text, headings, and more.
@font-family-sans-serif: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif; @font-family-sans-serif: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
@font-family-serif: Georgia, "Times New Roman", Times, serif; @font-family-serif: Georgia, 'Times New Roman', Times, serif;
//** Default monospace fonts for `<code>`, `<kbd>`, and `<pre>`. //** Default monospace fonts for `<code>`, `<kbd>`, and `<pre>`.
@font-family-monospace: Menlo, Monaco, Consolas, "Courier New", monospace; @font-family-monospace: Menlo, Monaco, Consolas, 'Courier New', monospace;
@font-family-base: @font-family-sans-serif; @font-family-base: @font-family-sans-serif;
@font-size-base: 13px; @font-size-base: 13px;
@@ -70,18 +67,16 @@
@headings-line-height: 1.1; @headings-line-height: 1.1;
@headings-color: #444; @headings-color: #444;
//== Iconography //== Iconography
// //
//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower. //## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
//** Load fonts from this directory. //** Load fonts from this directory.
@icon-font-path: "../fonts/"; @icon-font-path: '../fonts/';
//** File name for all font files. //** File name for all font files.
@icon-font-name: "glyphicons-halflings-regular"; @icon-font-name: 'glyphicons-halflings-regular';
//** Element ID within SVG icon file. //** Element ID within SVG icon file.
@icon-font-svg-id: "glyphicons_halflingsregular"; @icon-font-svg-id: 'glyphicons_halflingsregular';
//== Components //== Components
// //
@@ -116,7 +111,6 @@
//** Carets increase slightly in size for larger components. //** Carets increase slightly in size for larger components.
@caret-width-large: 5px; @caret-width-large: 5px;
//== Tables //== Tables
// //
//## Customizes the `.table` component with basic values, each used across all table variations. //## Customizes the `.table` component with basic values, each used across all table variations.
@@ -137,7 +131,6 @@
//** Border color for table and cell borders. //** Border color for table and cell borders.
@table-border-color: #ddd; @table-border-color: #ddd;
//== Buttons //== Buttons
// //
//## For each of Bootstrap's buttons, define text, background and border color. //## For each of Bootstrap's buttons, define text, background and border color.
@@ -170,7 +163,6 @@
@btn-link-disabled-color: @gray-light; @btn-link-disabled-color: @gray-light;
//== Forms //== Forms
// //
//## //##
@@ -203,9 +195,13 @@
//** Default `.form-control` height //** Default `.form-control` height
@input-height-base: (@line-height-computed + (@padding-base-vertical * 2) + 2); @input-height-base: (@line-height-computed + (@padding-base-vertical * 2) + 2);
//** Large `.form-control` height //** Large `.form-control` height
@input-height-large: (ceil(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2); @input-height-large: (
ceil(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2
);
//** Small `.form-control` height //** Small `.form-control` height
@input-height-small: (floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 2); @input-height-small: (
floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 2
);
//** `.form-group` margin //** `.form-group` margin
@form-group-margin-bottom: 15px; @form-group-margin-bottom: 15px;
@@ -221,7 +217,6 @@
//** Disabled cursor for form controls and buttons. //** Disabled cursor for form controls and buttons.
@cursor-disabled: not-allowed; @cursor-disabled: not-allowed;
//== Dropdowns //== Dropdowns
// //
//## Dropdown menu container and contents. //## Dropdown menu container and contents.
@@ -229,7 +224,7 @@
//** Background for the dropdown menu. //** Background for the dropdown menu.
@dropdown-bg: #fff; @dropdown-bg: #fff;
//** Dropdown menu `border-color`. //** Dropdown menu `border-color`.
@dropdown-border: rgba(0,0,0,.15); @dropdown-border: rgba(0, 0, 0, 0.15);
//** Dropdown menu `border-color` **for IE8**. //** Dropdown menu `border-color` **for IE8**.
@dropdown-fallback-border: #ccc; @dropdown-fallback-border: #ccc;
//** Divider color for between dropdown items. //** Divider color for between dropdown items.
@@ -256,7 +251,6 @@
//** Deprecated `@dropdown-caret-color` as of v3.1.0 //** Deprecated `@dropdown-caret-color` as of v3.1.0
@dropdown-caret-color: @gray-light; @dropdown-caret-color: @gray-light;
//-- Z-index master list //-- Z-index master list
// //
// Warning: Avoid customizing these values. They're used for a bird's eye view // Warning: Avoid customizing these values. They're used for a bird's eye view
@@ -272,7 +266,6 @@
@zindex-modal-background: 1040; @zindex-modal-background: 1040;
@zindex-modal: 1050; @zindex-modal: 1050;
//== Media queries breakpoints //== Media queries breakpoints
// //
//## Define the breakpoints at which your layout will change, adapting to different screen sizes. //## Define the breakpoints at which your layout will change, adapting to different screen sizes.
@@ -311,7 +304,6 @@
@screen-sm-max: (@screen-md-min - 1); @screen-sm-max: (@screen-md-min - 1);
@screen-md-max: (@screen-lg-min - 1); @screen-md-max: (@screen-lg-min - 1);
//== Grid system //== Grid system
// //
//## Define your custom responsive grid. //## Define your custom responsive grid.
@@ -326,7 +318,6 @@
//** Point at which the navbar begins collapsing. //** Point at which the navbar begins collapsing.
@grid-float-breakpoint-max: (@grid-float-breakpoint - 1); @grid-float-breakpoint-max: (@grid-float-breakpoint - 1);
//== Container sizes //== Container sizes
// //
//## Define the maximum width of `.container` for different screen sizes. //## Define the maximum width of `.container` for different screen sizes.
@@ -346,7 +337,6 @@
//** For `@screen-lg-min` and up. //** For `@screen-lg-min` and up.
@container-lg: @container-large-desktop; @container-lg: @container-large-desktop;
//== Navbar //== Navbar
// //
//## //##
@@ -382,7 +372,6 @@
@navbar-default-toggle-icon-bar-bg: rgba(0, 0, 0, 0.5); @navbar-default-toggle-icon-bar-bg: rgba(0, 0, 0, 0.5);
@navbar-default-toggle-border-color: transparent; @navbar-default-toggle-border-color: transparent;
// Inverted navbar // Inverted navbar
// Reset inverted navbar basics // Reset inverted navbar basics
@navbar-inverse-color: @gray-light; @navbar-inverse-color: @gray-light;
@@ -408,7 +397,6 @@
@navbar-inverse-toggle-icon-bar-bg: rgba(0, 0, 0, 0.5); @navbar-inverse-toggle-icon-bar-bg: rgba(0, 0, 0, 0.5);
@navbar-inverse-toggle-border-color: transparent; @navbar-inverse-toggle-border-color: transparent;
//== Navs //== Navs
// //
//## //##
@@ -437,7 +425,6 @@
@nav-pills-active-link-hover-bg: @component-active-bg; @nav-pills-active-link-hover-bg: @component-active-bg;
@nav-pills-active-link-hover-color: @component-active-color; @nav-pills-active-link-hover-color: @component-active-color;
//== Pagination //== Pagination
// //
//## //##
@@ -458,7 +445,6 @@
@pagination-disabled-bg: #fff; @pagination-disabled-bg: #fff;
@pagination-disabled-border: #ddd; @pagination-disabled-border: #ddd;
//== Pager //== Pager
// //
//## //##
@@ -474,7 +460,6 @@
@pager-disabled-color: @pagination-disabled-color; @pager-disabled-color: @pagination-disabled-color;
//== Jumbotron //== Jumbotron
// //
//## //##
@@ -485,7 +470,6 @@
@jumbotron-heading-color: @headings-color; @jumbotron-heading-color: @headings-color;
@jumbotron-font-size: ceil((@font-size-base * 1.5)); @jumbotron-font-size: ceil((@font-size-base * 1.5));
//== Form states and alerts //== Form states and alerts
// //
//## Define colors for form feedback states and, by default, alerts. //## Define colors for form feedback states and, by default, alerts.
@@ -506,7 +490,6 @@
@state-danger-bg: #f9bdbb; @state-danger-bg: #f9bdbb;
@state-danger-border: darken(spin(@state-danger-bg, -10), 5%); @state-danger-border: darken(spin(@state-danger-bg, -10), 5%);
//== Tooltips //== Tooltips
// //
//## //##
@@ -517,14 +500,13 @@
@tooltip-color: #fff; @tooltip-color: #fff;
//** Tooltip background color //** Tooltip background color
@tooltip-bg: #727272; @tooltip-bg: #727272;
@tooltip-opacity: .9; @tooltip-opacity: 0.9;
//** Tooltip arrow width //** Tooltip arrow width
@tooltip-arrow-width: 5px; @tooltip-arrow-width: 5px;
//** Tooltip arrow color //** Tooltip arrow color
@tooltip-arrow-color: @tooltip-bg; @tooltip-arrow-color: @tooltip-bg;
//== Popovers //== Popovers
// //
//## //##
@@ -553,7 +535,6 @@
//** Popover outer arrow fallback color //** Popover outer arrow fallback color
@popover-arrow-outer-fallback-color: darken(@popover-fallback-border-color, 20%); @popover-arrow-outer-fallback-color: darken(@popover-fallback-border-color, 20%);
//== Labels //== Labels
// //
//## //##
@@ -576,7 +557,6 @@
//** Default text color of a linked label //** Default text color of a linked label
@label-link-hover-color: #fff; @label-link-hover-color: #fff;
//== Modals //== Modals
// //
//## //##
@@ -599,7 +579,7 @@
//** Modal backdrop background color //** Modal backdrop background color
@modal-backdrop-bg: #000; @modal-backdrop-bg: #000;
//** Modal backdrop opacity //** Modal backdrop opacity
@modal-backdrop-opacity: .5; @modal-backdrop-opacity: 0.5;
//** Modal header border color //** Modal header border color
@modal-header-border-color: transparent; @modal-header-border-color: transparent;
//** Modal footer border color //** Modal footer border color
@@ -609,7 +589,6 @@
@modal-md: 600px; @modal-md: 600px;
@modal-sm: 300px; @modal-sm: 300px;
//== Alerts //== Alerts
// //
//## Define alert colors, border radius, and padding. //## Define alert colors, border radius, and padding.
@@ -634,7 +613,6 @@
@alert-danger-text: @state-danger-text; @alert-danger-text: @state-danger-text;
@alert-danger-border: @state-danger-border; @alert-danger-border: @state-danger-border;
//== Progress bars //== Progress bars
// //
//## //##
@@ -657,7 +635,6 @@
//** Info progress bar color //** Info progress bar color
@progress-bar-info-bg: @brand-info; @progress-bar-info-bg: @brand-info;
//== List group //== List group
// //
//## //##
@@ -691,7 +668,6 @@
@list-group-link-hover-color: @list-group-link-color; @list-group-link-hover-color: @list-group-link-color;
@list-group-link-heading-color: #333; @list-group-link-heading-color: #333;
//== Panels //== Panels
// //
//## //##
@@ -730,7 +706,6 @@
@panel-danger-border: @state-danger-border; @panel-danger-border: @state-danger-border;
@panel-danger-heading-bg: @brand-danger; @panel-danger-heading-bg: @brand-danger;
//== Thumbnails //== Thumbnails
// //
//## //##
@@ -749,7 +724,6 @@
//** Padding around the thumbnail caption //** Padding around the thumbnail caption
@thumbnail-caption-padding: 9px; @thumbnail-caption-padding: 9px;
//== Wells //== Wells
// //
//## //##
@@ -757,7 +731,6 @@
@well-bg: #f9f9f9; @well-bg: #f9f9f9;
@well-border: transparent; @well-border: transparent;
//== Badges //== Badges
// //
//## //##
@@ -776,7 +749,6 @@
@badge-line-height: 1; @badge-line-height: 1;
@badge-border-radius: 10px; @badge-border-radius: 10px;
//== Breadcrumbs //== Breadcrumbs
// //
//## //##
@@ -790,18 +762,17 @@
//** Text color of current page in the breadcrumb //** Text color of current page in the breadcrumb
@breadcrumb-active-color: @gray-light; @breadcrumb-active-color: @gray-light;
//** Textual separator for between breadcrumb elements //** Textual separator for between breadcrumb elements
@breadcrumb-separator: "/"; @breadcrumb-separator: '/';
//== Carousel //== Carousel
// //
//## //##
@carousel-text-shadow: 0 1px 2px rgba(0,0,0,.6); @carousel-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
@carousel-control-color: #fff; @carousel-control-color: #fff;
@carousel-control-width: 15%; @carousel-control-width: 15%;
@carousel-control-opacity: .5; @carousel-control-opacity: 0.5;
@carousel-control-font-size: 20px; @carousel-control-font-size: 20px;
@carousel-indicator-active-bg: #fff; @carousel-indicator-active-bg: #fff;
@@ -809,7 +780,6 @@
@carousel-caption-color: #fff; @carousel-caption-color: #fff;
//== Close //== Close
// //
//## //##
@@ -818,7 +788,6 @@
@close-color: #000; @close-color: #000;
@close-text-shadow: none; @close-text-shadow: none;
//== Code //== Code
// //
//## //##
@@ -834,7 +803,6 @@
@pre-border-color: #ccc; @pre-border-color: #ccc;
@pre-scrollable-max-height: 340px; @pre-scrollable-max-height: 340px;
//== Type //== Type
// //
//## //##

View File

@@ -2,24 +2,40 @@
// ------------------------- // -------------------------
.@{fa-css-prefix}-border { .@{fa-css-prefix}-border {
padding: .2em .25em .15em; padding: 0.2em 0.25em 0.15em;
border: solid .08em @fa-border-color; border: solid 0.08em @fa-border-color;
border-radius: .1em; border-radius: 0.1em;
} }
.@{fa-css-prefix}-pull-left { float: left; } .@{fa-css-prefix}-pull-left {
.@{fa-css-prefix}-pull-right { float: right; } float: left;
}
.@{fa-css-prefix}-pull-right {
float: right;
}
.@{fa-css-prefix} { .@{fa-css-prefix} {
&.@{fa-css-prefix}-pull-left { margin-right: .3em; } &.@{fa-css-prefix}-pull-left {
&.@{fa-css-prefix}-pull-right { margin-left: .3em; } margin-right: 0.3em;
}
&.@{fa-css-prefix}-pull-right {
margin-left: 0.3em;
}
} }
/* Deprecated as of 4.4.0 */ /* Deprecated as of 4.4.0 */
.pull-right { float: right; } .pull-right {
.pull-left { float: left; } float: right;
}
.pull-left {
float: left;
}
.@{fa-css-prefix} { .@{fa-css-prefix} {
&.pull-left { margin-right: .3em; } &.pull-left {
&.pull-right { margin-left: .3em; } margin-right: 0.3em;
}
&.pull-right {
margin-left: 0.3em;
}
} }

View File

@@ -8,5 +8,4 @@
text-rendering: auto; // optimizelegibility throws things off #1094 text-rendering: auto; // optimizelegibility throws things off #1094
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }

View File

@@ -3,16 +3,16 @@
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
*/ */
@import "variables.less"; @import 'variables.less';
@import "mixins.less"; @import 'mixins.less';
@import "path.less"; @import 'path.less';
@import "core.less"; @import 'core.less';
@import "larger.less"; @import 'larger.less';
@import "fixed-width.less"; @import 'fixed-width.less';
@import "list.less"; @import 'list.less';
@import "bordered-pulled.less"; @import 'bordered-pulled.less';
@import "animated.less"; @import 'animated.less';
@import "rotated-flipped.less"; @import 'rotated-flipped.less';
@import "stacked.less"; @import 'stacked.less';
@import "icons.less"; @import 'icons.less';
@import "screen-reader.less"; @import 'screen-reader.less';

File diff suppressed because it is too large Load Diff

View File

@@ -7,7 +7,15 @@
line-height: (3em / 4); line-height: (3em / 4);
vertical-align: -15%; vertical-align: -15%;
} }
.@{fa-css-prefix}-2x { font-size: 2em; } .@{fa-css-prefix}-2x {
.@{fa-css-prefix}-3x { font-size: 3em; } font-size: 2em;
.@{fa-css-prefix}-4x { font-size: 4em; } }
.@{fa-css-prefix}-5x { font-size: 5em; } .@{fa-css-prefix}-3x {
font-size: 3em;
}
.@{fa-css-prefix}-4x {
font-size: 4em;
}
.@{fa-css-prefix}-5x {
font-size: 5em;
}

View File

@@ -5,7 +5,9 @@
padding-left: 0; padding-left: 0;
margin-left: @fa-li-width; margin-left: @fa-li-width;
list-style-type: none; list-style-type: none;
> li { position: relative; } > li {
position: relative;
}
} }
.@{fa-css-prefix}-li { .@{fa-css-prefix}-li {
position: absolute; position: absolute;

View File

@@ -8,24 +8,22 @@
text-rendering: auto; // optimizelegibility throws things off #1094 text-rendering: auto; // optimizelegibility throws things off #1094
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.fa-icon-rotate(@degrees, @rotation) { .fa-icon-rotate(@degrees, @rotation) {
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation})"; -ms-filter: 'progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation})';
-webkit-transform: rotate(@degrees); -webkit-transform: rotate(@degrees);
-ms-transform: rotate(@degrees); -ms-transform: rotate(@degrees);
transform: rotate(@degrees); transform: rotate(@degrees);
} }
.fa-icon-flip(@horiz, @vert, @rotation) { .fa-icon-flip(@horiz, @vert, @rotation) {
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation}, mirror=1)"; -ms-filter: 'progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation}, mirror=1)';
-webkit-transform: scale(@horiz, @vert); -webkit-transform: scale(@horiz, @vert);
-ms-transform: scale(@horiz, @vert); -ms-transform: scale(@horiz, @vert);
transform: scale(@horiz, @vert); transform: scale(@horiz, @vert);
} }
// Only display content to screen readers. A la Bootstrap 4. // Only display content to screen readers. A la Bootstrap 4.
// //
// See: http://a11yproject.com/posts/how-to-hide-content/ // See: http://a11yproject.com/posts/how-to-hide-content/

View File

@@ -4,7 +4,8 @@
@font-face { @font-face {
font-family: 'FontAwesome'; font-family: 'FontAwesome';
src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}'); src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}');
src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'), src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}')
format('embedded-opentype'),
url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'), url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'),
url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'), url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'),
url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'), url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'),

View File

@@ -1,12 +1,22 @@
// Rotated & Flipped Icons // Rotated & Flipped Icons
// ------------------------- // -------------------------
.@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } .@{fa-css-prefix}-rotate-90 {
.@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } .fa-icon-rotate(90deg, 1);
.@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } }
.@{fa-css-prefix}-rotate-180 {
.fa-icon-rotate(180deg, 2);
}
.@{fa-css-prefix}-rotate-270 {
.fa-icon-rotate(270deg, 3);
}
.@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } .@{fa-css-prefix}-flip-horizontal {
.@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } .fa-icon-flip(-1, 1, 0);
}
.@{fa-css-prefix}-flip-vertical {
.fa-icon-flip(1, -1, 2);
}
// Hook for IE8-9 // Hook for IE8-9
// ------------------------- // -------------------------

View File

@@ -1,5 +1,9 @@
// Screen Readers // Screen Readers
// ------------------------- // -------------------------
.sr-only { .sr-only(); } .sr-only {
.sr-only-focusable { .sr-only-focusable(); } .sr-only();
}
.sr-only-focusable {
.sr-only-focusable();
}

View File

@@ -9,12 +9,19 @@
line-height: 2em; line-height: 2em;
vertical-align: middle; vertical-align: middle;
} }
.@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { .@{fa-css-prefix}-stack-1x,
.@{fa-css-prefix}-stack-2x {
position: absolute; position: absolute;
left: 0; left: 0;
width: 100%; width: 100%;
text-align: center; text-align: center;
} }
.@{fa-css-prefix}-stack-1x { line-height: inherit; } .@{fa-css-prefix}-stack-1x {
.@{fa-css-prefix}-stack-2x { font-size: 2em; } line-height: inherit;
.@{fa-css-prefix}-inverse { color: @fa-inverse; } }
.@{fa-css-prefix}-stack-2x {
font-size: 2em;
}
.@{fa-css-prefix}-inverse {
color: @fa-inverse;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,12 +1,6 @@
{ {
"name": "WakaTime", "name": "WakaTime",
"ignore": [ "ignore": ["**/.*", "node_modules", "bower_components", "test", "tests"],
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": { "dependencies": {
"font-awesome": "~4.6.3", "font-awesome": "~4.6.3",
"bootstrap": "~3.3.4" "bootstrap": "~3.3.4"

View File

@@ -24,8 +24,14 @@ gulp.task('webextension',function(cb){
fs.mkdirSync('public/js'); fs.mkdirSync('public/js');
} }
fs.copyFileSync('node_modules/webextension-polyfill/dist/browser-polyfill.min.js', 'public/js/browser-polyfill.min.js'); fs.copyFileSync(
fs.copyFileSync('node_modules/webextension-polyfill/dist/browser-polyfill.min.js.map', 'public/js/browser-polyfill.min.js.map'); 'node_modules/webextension-polyfill/dist/browser-polyfill.min.js',
'public/js/browser-polyfill.min.js',
);
fs.copyFileSync(
'node_modules/webextension-polyfill/dist/browser-polyfill.min.js.map',
'public/js/browser-polyfill.min.js.map',
);
}); });
/* /*

View File

@@ -1,15 +1,14 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title>WakaTime options</title> <title>WakaTime options</title>
<link href="public/css/app.css" rel="stylesheet"> <link href="public/css/app.css" rel="stylesheet" />
</head> </head>
<body> <body>
<div id="wakatime-options"></div> <div id="wakatime-options"></div>
<script src="public/js/browser-polyfill.min.js"></script> <script src="public/js/browser-polyfill.min.js"></script>

2898
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,19 +1,33 @@
{ {
"name": "chrome-wakatime",
"scripts": { "scripts": {
"test": "jest --verbose --coverage && mocha --compilers js:mocha-traceur tests/**/*.spec.js", "test": "clap test",
"test-react": "jest --verbose --coverage", "start": "clap build",
"test-js": "node_modules/.bin/phantomjs tests/run.js",
"start": "npm install && bower install && gulp",
"gulp": "gulp", "gulp": "gulp",
"watch": "gulp watch", "watch": "gulp watch",
"lint": "jsxhint --jsx-only .", "lint": "clap lint",
"postinstall": "gulp postinstall", "postinstall": "clap postinstall",
"validate": "npm ls" "validate": "npm ls"
}, },
"pre-commit": [ "husky": {
"lint" "hooks": {
"pre-commit": "lint-staged",
"pre-push": "npm test"
}
},
"lint-staged": {
"*.{js|jsx|ts|tsx}": [
"eslint",
"prettier --write",
"git add"
], ],
"*.json": [
"prettier --write"
]
},
"jest": { "jest": {
"verbose": true,
"testURL": "http://localhost/",
"testFileExtensions": [ "testFileExtensions": [
"jest.js" "jest.js"
], ],
@@ -25,25 +39,35 @@
}, },
"private": true, "private": true,
"devDependencies": { "devDependencies": {
"@types/node": "^14.14.20",
"@xarc/run": "^1.0.4",
"babel-jest": "^22.1.0", "babel-jest": "^22.1.0",
"bower": "^1.7.9", "bower": "^1.7.9",
"chai": "^4.1.2", "chai": "^4.1.2",
"del": "^3.0.0", "del": "^3.0.0",
"eslint": "^7.17.0",
"gulp": "^3.9.1", "gulp": "^3.9.1",
"husky": "^4.3.7",
"jest-cli": "^22.1.4", "jest-cli": "^22.1.4",
"jsdom": "^16.4.0",
"jshint": "^2.9.2", "jshint": "^2.9.2",
"jsxhint": "^0.15.1", "jsxhint": "^0.15.1",
"laravel-elixir": "^6.0.0-17", "laravel-elixir": "^6.0.0-17",
"laravel-elixir-browserify-official": "^0.1.3", "laravel-elixir-browserify-official": "^0.1.3",
"lint-staged": "^10.5.3",
"mocha": "^5.0.0", "mocha": "^5.0.0",
"mocha-sinon": "^2.0.0", "mocha-sinon": "^2.0.0",
"mocha-traceur": "^2.1.0", "mocha-traceur": "^2.1.0",
"phantomjs": "^2.1.7",
"popper.js": "^1.14.6", "popper.js": "^1.14.6",
"precommit-hook": "^3.0.0", "prettier": "^2.2.1",
"rimraf": "^3.0.2",
"sinon": "^4.2.2", "sinon": "^4.2.2",
"sinon-chai": "^2.8.0", "sinon-chai": "^2.8.0",
"sinon-chrome": "^2.2.4", "sinon-chrome": "^2.2.4",
"traceur": "^0.0.111" "traceur": "^0.0.111",
"ts-node": "^9.1.1",
"typescript": "^4.1.3"
}, },
"dependencies": { "dependencies": {
"bootstrap": "^4.0.0", "bootstrap": "^4.0.0",

View File

@@ -1,15 +1,14 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1" />
<title>WakaTime</title> <title>WakaTime</title>
<link href="public/css/app.css" rel="stylesheet"> <link href="public/css/app.css" rel="stylesheet" />
</head> </head>
<body> <body>
<div id="wakatime"></div> <div id="wakatime"></div>
<script src="public/js/browser-polyfill.min.js"></script> <script src="public/js/browser-polyfill.min.js"></script>

View File

@@ -5,14 +5,22 @@ var beforeLoadFn;
beforeEach(function () { beforeEach(function () {
page = require('webpage').create(); page = require('webpage').create();
page.onConsoleMessage = function(msg) { console.log(msg); }; page.onConsoleMessage = function (msg) {
console.log(msg);
};
page.onError = function (msg, trace) { page.onError = function (msg, trace) {
var msgStack = [msg]; var msgStack = [msg];
if (trace && trace.length) { if (trace && trace.length) {
msgStack.push('TRACE:'); msgStack.push('TRACE:');
trace.forEach(function (t) { trace.forEach(function (t) {
msgStack.push(' -> ' + t.file + ': ' + t.line + (t.function ? ' (in function "' + t.function +'")' : '')); msgStack.push(
' -> ' +
t.file +
': ' +
t.line +
(t.function ? ' (in function "' + t.function + '")' : ''),
);
}); });
} }
// we need try..catch here as mocha throws error that catched by phantom.onError // we need try..catch here as mocha throws error that catched by phantom.onError

View File

@@ -1,10 +1,8 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8" />
<title></title> <title></title>
</head> </head>
<body> <body></body>
</body>
</html> </html>

View File

@@ -1,7 +1,7 @@
var chai = require('chai'); var chai = require('chai');
var expect = chai.expect; var expect = chai.expect;
//import changeExtensionIcon from '../../assets/js/helpers/changeExtensionIcon'; var changeExtensionIcon = require('../../assets/js/helpers/changeExtensionIcon');
describe('changeExtensionIcon', function () { describe('changeExtensionIcon', function () {
it('should be a function', function () { it('should be a function', function () {

View File

@@ -1,9 +1,12 @@
var chai = require('chai'); var chai = require('chai');
var expect = chai.expect; var expect = chai.expect;
//import changeExtensionState from '../../assets/js/helpers/changeExtensionState'; var changeExtensionState = require('../../assets/js/helpers/changeExtensionState');
describe('changeExtensionState', function () { describe('changeExtensionState', function () {
beforeEach(() => {
browser = window;
});
it('should be a function', function () { it('should be a function', function () {
expect(changeExtensionState).to.be.a('function'); expect(changeExtensionState).to.be.a('function');
}); });

View File

@@ -3,8 +3,7 @@ var sinon = require('sinon-chai');
var chrome = require('sinon-chrome'); var chrome = require('sinon-chrome');
var expect = chai.expect; var expect = chai.expect;
//import changeExtensionTooltip from '../../assets/js/helpers/changeExtensionTooltip'; var changeExtensionTooltip = require('../../assets/js/helpers/changeExtensionTooltip');
describe('changeExtensionTooltip', function () { describe('changeExtensionTooltip', function () {
it('should be a function', function () { it('should be a function', function () {
expect(changeExtensionTooltip).to.be.a('function'); expect(changeExtensionTooltip).to.be.a('function');

View File

@@ -1,7 +1,7 @@
var chai = require('chai'); var chai = require('chai');
var expect = chai.expect; var expect = chai.expect;
//import contains from '../../assets/js/helpers/contains'; var contains = require('../../assets/js/helpers/contains');
describe('contains', function () { describe('contains', function () {
it('should be a function', function () { it('should be a function', function () {
@@ -9,16 +9,14 @@ describe('contains', function() {
}); });
it('should match url against blacklist and return true', function () { it('should match url against blacklist and return true', function () {
var list = 'localhost\ntest.com';
var list = "localhost\ntest.com";
var url = 'http://localhost/fooapp'; var url = 'http://localhost/fooapp';
expect(contains(url, list)).to.equal(true); expect(contains(url, list)).to.equal(true);
}); });
it('should not match url against blacklist and return false', function () { it('should not match url against blacklist and return false', function () {
var list = 'localhost2\ntest.com';
var list = "localhost2\ntest.com";
var url = 'http://localhost/fooapp'; var url = 'http://localhost/fooapp';
expect(contains(url, list)).to.equal(false); expect(contains(url, list)).to.equal(false);

View File

@@ -1,7 +1,7 @@
var chai = require('chai'); var chai = require('chai');
var expect = chai.expect; var expect = chai.expect;
//import getDomainFromUrl from '../../assets/js/helpers/getDomainFromUrl'; var getDomainFromUrl = require('../../assets/js/helpers/getDomainFromUrl');
describe('getDomainFromUrl', function () { describe('getDomainFromUrl', function () {
it('should be a function', function () { it('should be a function', function () {
@@ -9,9 +9,13 @@ describe('getDomainFromUrl', function() {
}); });
it('should return the domain', function () { it('should return the domain', function () {
expect(getDomainFromUrl('http://google.com/something/very/secret')).to.equal('http://google.com'); expect(getDomainFromUrl('http://google.com/something/very/secret')).to.equal(
'http://google.com',
);
expect(getDomainFromUrl('http://www.google.com/something/very/secret')).to.equal('http://www.google.com'); expect(getDomainFromUrl('http://www.google.com/something/very/secret')).to.equal(
'http://www.google.com',
);
// This is not how it was imaged to work, but let's leave it here as a warning. // This is not how it was imaged to work, but let's leave it here as a warning.
expect(getDomainFromUrl('google.com/something/very/secret')).to.equal('google.com//very'); expect(getDomainFromUrl('google.com/something/very/secret')).to.equal('google.com//very');

View File

@@ -1,7 +1,7 @@
var chai = require('chai'); var chai = require('chai');
var expect = chai.expect; var expect = chai.expect;
//import in_array from '../../assets/js/helpers/in_array'; var in_array = require('../../assets/js/helpers/in_array');
describe('in_array', function () { describe('in_array', function () {
it('should be a function', function () { it('should be a function', function () {

Some files were not shown because too many files have changed in this diff Show More