bootstrap_sass 4.0.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 92

bootstrap_sass

This project contains all the bootstrap sass source files. This project will be useful to create new themes using sass.

bootstrap_sass is a Sass-powered version of Bootstrap, ready to drop right into your Sass powered applications.

Usage

1. Create a new project with next structure:

[project_root]
  ├─ pubspec.yaml
  ├─ tool
  │  └─ build.dart
  ├─ web
  │  ├─ index.html
  │  ├─ variables.scss
  │  ├─ theme.scss
  │  └─ ... other files and folders ...
  └─ lib
     └─ ... lib files and folders ...

2. In the pubspec.yaml file add the bootstrap_sass and sass_builder dependencies.

...
depencencies:
  ...
  bootstrap_sass: ^4.0.0 # change for the latest version
  ...
dev_dependencies:
  ...
  sass_builder: ^1.0.0 # change for the latest version
  ...

3. Then in tool/build.dart or tool/watch.dart file add next code to convert sass files into css.

import 'dart:async';

import 'package:build_runner/build_runner.dart';
import 'package:sass_builder/phase.dart';

Future main() async {
  await build(new PhaseGroup()..addPhase(sassPhase), deleteFilesByDefault: true);
}

4. Then in variables.scss add the variables you want to modify

//== Colors
//
//## Gray and brand colors for use across Bootstrap.

$gray-base: #800625;
$gray-darker:            lighten($gray-base, 13.5%); // #222
$gray-dark:              lighten($gray-base, 20%);   // #333
$gray:                   lighten($gray-base, 33.5%); // #555
$gray-light:             lighten($gray-base, 60%);   // #999
$gray-lighter:           lighten($gray-base, 93.5%); // #eee

$brand-primary:          #e72b42;
$brand-success:          #73A839;
$brand-info:             #033C73;
$brand-warning:          #DD5600;
$brand-danger:           #22afc7;
...

5. In the theme.scss add the styles you need to change.

@import 'variables' // variables should be before bootstrap to override variable values
@import 'packages/bootstrap_sass/stylesheets/bootstrap';

// Cerulean 3.3.5
// Bootswatch
// -----------------------------------------------------

@mixin btn-shadow($color){
  @include gradient-vertical-three-colors(lighten($color, 8%), $color, 60%, darken($color, 4%));
  filter: none;
  border-bottom: 1px solid darken($color, 10%);
}

// Navbar =====================================================================

.navbar {
  @include btn-shadow($navbar-default-bg);
  filter: none;
  @include box-shadow(0 1px 10px rgba(0, 0, 0, 0.1));

  &-default {

    .badge {
      background-color: #fff;
      color: $navbar-default-bg;
    }
  }

  &-inverse {
    @include gradient-vertical-three-colors(lighten($navbar-inverse-bg, 8%), lighten($navbar-inverse-bg, 4%), 60%, darken($navbar-inverse-bg, 2%));
    filter: none;
    border-bottom: 1px solid darken($navbar-inverse-bg, 10%);

    .badge {
      background-color: #fff;
      color: $navbar-inverse-bg;
    }
  }

  .navbar-nav > li > a,
  &-brand {
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
  }
}
...

6. Run tool/build.dart and generate the required css.

7. Finally in the index.html you will add the link to theme.css as bellow:

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- you could add bootstrap.css file -->
  <link rel="stylesheet" href="packages/bootstrap_sass/sass/bootstrap.css">
  <!-- you can also add theme.css -->
  <link rel="stylesheet" href="theme.css">
</head>
<body>
  <!-- ... content here ... -->
</body>
</html>

Credits

bootstrap-sass has a number of major contributors:

and a [significant number of other contributors][contrib].

The dart port is made by: Luis Vargas

Bugs and feature requests

Have a bug or a feature request to bootstrap core? Please open a new issue at https://github.com/twbs/bootstrap/issues/new.

Have a bug or a feature request to bootstrap_sass dart port? Please open a new issue at https://github.com/dart-league/bootstrap_sass/issues/new.

Code and documentation copyright 2011-2018 the Bootstrap Authors and Twitter, Inc. Code released under the MIT License. Docs released under Creative Commons.

4.0.0

  • upgrade to v4.0.0

4.0.0-beta.2

  • upgrade to v4.0.0-beta.2

4.0.0-beta

  • upgrade to v4.0.0-beta

4.0.0-alpha.6

  • upgrade to v4.0.0-alpha.6

4.0.0-alpha.5

  • upgrade to v4.0.0-alpha.5

4.0.0-alpha.3+5

  • remove sass_transformer and add dart-sass and grinder

4.0.0-alpha.3+3

  • upgrade to sass_transformer 0.1.1

4.0.0-alpha.3+2

  • use sass_transformer 0.1.0 instead dart-sass 0.4.2
  • remove packages path into main sass files

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  bootstrap_sass: "^4.0.0"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or packages get. Check the docs for your editor to learn more.

Version Uploaded Documentation Archive
4.0.0 Apr 3, 2018 Go to the documentation of bootstrap_sass 4.0.0 Download bootstrap_sass 4.0.0 archive
3.3.6 Jan 16, 2016 Go to the documentation of bootstrap_sass 3.3.6 Download bootstrap_sass 3.3.6 archive
4.0.0-beta.2 Dec 3, 2017 Go to the documentation of bootstrap_sass 4.0.0-beta.2 Download bootstrap_sass 4.0.0-beta.2 archive
4.0.0-beta Sep 28, 2017 Go to the documentation of bootstrap_sass 4.0.0-beta Download bootstrap_sass 4.0.0-beta archive
4.0.0-alpha.6 Mar 16, 2017 Go to the documentation of bootstrap_sass 4.0.0-alpha.6 Download bootstrap_sass 4.0.0-alpha.6 archive
4.0.0-alpha.5+1 Feb 24, 2017 Go to the documentation of bootstrap_sass 4.0.0-alpha.5+1 Download bootstrap_sass 4.0.0-alpha.5+1 archive
4.0.0-alpha.5 Dec 18, 2016 Go to the documentation of bootstrap_sass 4.0.0-alpha.5 Download bootstrap_sass 4.0.0-alpha.5 archive
4.0.0-alpha.3+5 Dec 2, 2016 Go to the documentation of bootstrap_sass 4.0.0-alpha.3+5 Download bootstrap_sass 4.0.0-alpha.3+5 archive
4.0.0-alpha.3+4 Aug 27, 2016 Go to the documentation of bootstrap_sass 4.0.0-alpha.3+4 Download bootstrap_sass 4.0.0-alpha.3+4 archive
4.0.0-alpha.3+3 Aug 27, 2016 Go to the documentation of bootstrap_sass 4.0.0-alpha.3+3 Download bootstrap_sass 4.0.0-alpha.3+3 archive

All 14 versions...

Analysis

We analyzed this package on Apr 9, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.46.0
  • pana: 0.10.6

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
85 / 100
Health:
Code health derived from static analysis. [more]
100 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
92
Learn more about scoring.

Platforms

Detected platforms: Flutter, web, other

No libraries.

Suggestions

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use bootstrap_sass.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.8.0 <2.0.0
Dev dependencies
grinder ^0.8.1
sass ^1.0.0