_reboot.scss 2.5 KB
Newer Older
1
//
2
// Scaffolding
3
// --------------------------------------------------
Jacob Thornton's avatar
Jacob Thornton committed
4

5

Mark Otto's avatar
Mark Otto committed
6
// Reset the box-sizing
7
8
9
10
//
// Heads up! This reset may cause conflicts with some third-party widgets.
// For recommendations on resolving such conflicts, see
// http://getbootstrap.com/getting-started/#third-box-sizing
Chris Rebert's avatar
Chris Rebert committed
11
12
// Credit: Jon Neal & CSS-Tricks
// http://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/
13

Chris Rebert's avatar
Chris Rebert committed
14
15
16
html {
  box-sizing: border-box;
}
17

18
*,
19
20
*:before,
*:after {
Chris Rebert's avatar
Chris Rebert committed
21
  box-sizing: inherit;
Mark Otto's avatar
Mark Otto committed
22
23
24
}


25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Make viewport responsive
//
// @viewport is supposed to eventually replace <meta name="viewport">. It's manually prefixed for forward-compatibility.
//
// @viewport is also needed because IE 10+ doesn't honor <meta name="viewport"> in some cases.
// (See http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/)
//
// However, `device-width` is broken on IE 10 on Windows (Phone) 8,
// (see http://timkadlec.com/2013/01/windows-phone-8-and-device-width/
// and https://github.com/twbs/bootstrap/issues/10497)
// and the fix for that involves a snippet of JavaScript to sniff the user agent and apply some conditional CSS.
// See http://getbootstrap.com/getting-started/#support-ie10-width for the relevant hack.

@-moz-viewport      { width: device-width; }
@-ms-viewport       { width: device-width; }
@-o-viewport        { width: device-width; }
@-webkit-viewport   { width: device-width; }
@viewport           { width: device-width; }


45
// Reset HTML, body, and more
Jacob Thornton's avatar
Jacob Thornton committed
46

47
html {
Mark Otto's avatar
Mark Otto committed
48
  font-size: $font-size-root;
49
50
51
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}

Jacob Thornton's avatar
Jacob Thornton committed
52
body {
Mark Otto's avatar
Mark Otto committed
53
54
55
56
57
  font-family: $font-family-base;
  font-size: $font-size-base;
  line-height: $line-height-base;
  color: $text-color;
  background-color: $body-bg;
58
59
60
61
62
63
}

input,
button,
select,
textarea {
Mark Otto's avatar
Mark Otto committed
64
65
66
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
Jacob Thornton's avatar
Jacob Thornton committed
67
68
}

69

70
// Links
Jacob Thornton's avatar
Jacob Thornton committed
71
72

a {
Mark Otto's avatar
Mark Otto committed
73
  color: $link-color;
Jacob Thornton's avatar
Jacob Thornton committed
74
  text-decoration: none;
Zlatan Vasović's avatar
Zlatan Vasović committed
75

76
  @include hover-focus {
Mark Otto's avatar
Mark Otto committed
77
78
    color: $link-hover-color;
    text-decoration: $link-hover-decoration;
Zlatan Vasović's avatar
Zlatan Vasović committed
79
80
81
  }

  &:focus {
Mark Otto's avatar
Mark Otto committed
82
    @include tab-focus();
Zlatan Vasović's avatar
Zlatan Vasović committed
83
  }
Mark Otto's avatar
Mark Otto committed
84
}
85
86
87
88


// Images

Mark Otto's avatar
Mark Otto committed
89
img {
Mark Otto's avatar
Mark Otto committed
90
91
92
  vertical-align: middle;
}

93

Mark Otto's avatar
Mark Otto committed
94
95
96
97
98
99
100
101
102
103
// iOS "clickable elements" fix for role="button"
//
// Fixes "clickability" issue (and more generally, the firing of events such as focus as well)
// for traditionally non-focusable elements with role="button"
// see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
// Upstream patch for normalize.css submitted: https://github.com/necolas/normalize.css/pull/379 - remove this fix once that is merged

[role="button"] {
  cursor: pointer;
}