Skip to content

Instantly share code, notes, and snippets.

.navbar
.caret
.label
.table
.img-responsive
.img-rounded
.img-thumbnail
.img-circle
.sr-only
.lead
var fs = require('fs')
, read = fs.readFileSync
, css_parse = require('css-parse');
var parsedCss = css_parse(read("./path/to/bootstrap.min.css", 'utf8'));
var collectedClassnames = {}
for (var i = 0; i < parsedCss.stylesheet.rules.length; ++i) {
var rule = output_obj.stylesheet.rules[i];
Here are all the classes from Bootstrap 3 (version 3.1.1).
Method of extraction:
1. Download Bootstrap 3 and rename bootstrap.css as "bootstrap.html"
2. Add the following 24 lines of code to the very bottom of the bootstrap.html file:
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js"></script>
<script>
@cosmicscr
cosmicscr / bootstrap_3_full_class_list
Last active June 3, 2023 00:07
bootstrap 3 full class list
Here are all the classes from Bootstrap 3 (version 3.1.1).
Method of extraction:
1. Download Bootstrap 3 and rename bootstrap.css as "bootstrap.html"
2. Add the following 24 lines of code to the very bottom of the bootstrap.html file:
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js"></script>
<script>
@brysongilbert
brysongilbert / css-shadow-mixin.less
Created October 15, 2012 01:48
LESS Mixin for CSS/SVG Filter Drop Shadows
// Drop shadow using SVG/CSS filters were possible
// Requires Modernizr and the css-filters and svg-filters community add-ons
.filter-shadow(@x, @y, @size, @color) {
// Firefox 10+
.svgfilters & {
@svgSize: @size/2; // the SVG blur is a little larger than the CSS equivalent
filter: url('data:image/svg+xml;utf8,<svg%20height="100"%20xmlns="http://www.w3.org/2000/svg"><filter%20id="drop-shadow"><feGaussianBlur%20in="SourceAlpha"%20stdDeviation="@{svgSize}"/><feOffset%20dx="@{x}"%20dy="@{y}"%20result="offsetblur"/><feFlood%20flood-color="@{color}"/><feComposite%20in2="offsetblur"%20operator="in"/><feMerge><feMergeNode/><feMergeNode%20in="SourceGraphic"/></feMerge></filter></svg>#drop-shadow');
}
// Chrome 19+, Safari 6+