summaryrefslogtreecommitdiff
path: root/app/assets/stylesheets/bootstrapify.scss
blob: 08421f93e285a0b0e68447f6ca9e2d104d68fa67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
@import "bootstrap";

// Connect Bootstrap classes to reasonable defaults

.btn {
	@extend .btn-default;
}

button,
a[role="button"],
input[type="submit"],
input[type="reset"],
input[type="button"] {
	@extend .btn;
}

.navbar {
	form {
		@extend .navbar-form;
	}
	.nav {
		@extend .navbar-nav;
	}
	ul {
		@extend .nav;
	}
}
form {
	// This list of types is taken from the 2014-04-29 draft of
	// the HTML5 spec:
	//     http://www.w3.org/TR/2014/CR-html5-20140429/forms.html#attr-input-type
	input[type="text"],
	input[type="search"],
	input[type="tel"],
	input[type="url"],
	input[type="email"],
	input[type="password"],
	input[type="date"],
	input[type="time"],
	input[type="number"],
	input[type="range"],
	input[type="color"],
	select, textarea {
		@extend .form-control;
	}
	label {
		@extend .control-label;
	}
}

header nav {
	@extend .navbar;
	@extend .navbar-default;
}

.alert { @extend .alert-default; }
.alert-success { @extend .alert; }
.alert-info    { @extend .alert; }
.alert-warning { @extend .alert; }
.alert-danger  { @extend .alert; }

.panel-primary { @extend .panel; }
.panel-success { @extend .panel; }
.panel-info    { @extend .panel; }
.panel-warning { @extend .panel; }
.panel-danger  { @extend .panel; }
.panel {
	h1, h2, h3, h4, h5, h6 {
		@extend .panel-heading;
		@extend .panel-title;
	}
}

// Connect built-in Rails classes to the Bootstrap classes.

form {
	.field {
		@extend .form-group;
	}
	.field_with_errors {
		@extend .has-error;
		display: inline;
	}
}

#error_explanation {
	@extend .panel-danger;
	@extend .container;
	padding-left: 0;
	padding-right: 0;
}