Class: Tabulous::CssScaffolding

Inherits:
Object
  • Object
show all
Defined in:
lib/tabulous/css_scaffolding.rb

Class Method Summary collapse

Class Method Details

.embeddable_stylesObject



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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'lib/tabulous/css_scaffolding.rb', line 4

def self.embeddable_styles
  %Q{
    <style type="text/css">

    body {
      margin: 0;
      padding: 0;
    }

    .tabs, .tabs ul, .tabs ul li, .tabs ul li span, .tabs ul li a,
    .subtabs, .subtabs ul, .subtabs ul li, .subtabs ul li span, .subtabs ul li a {
      margin: 0;
      padding: 0;
      line-height: 1;
    }

    .tabs, .tabs a, .tabs a:visited, .tabs a:hover {
      color: #{Config.text_color};
    }

    .tabs li.disabled, .tabs li.disabled a, .tabs li.disabled a:visited, .tabs li.disabled a:hover,
    .subtabs li.disabled, .subtabs li.disabled a, .subtabs li.disabled a:visited, .subtabs li.disabled a:hover {
      color: #{Config.inactive_text_color};
    }

    .tabs a {
      text-decoration: none;
    }

    .tabs ul {
      font-size: 24px;
      height: 57px;
      list-style-type: none;
      background-color: #{Config.background_color};
      padding: 0 0 0 50px;
    }

    .tabs ul li {
      padding-top: 25px;
      padding-right: 5px;
      float: left;
    }

    .tabs ul li .tab {
      background-color: #{Config.inactive_tab_color};
      padding: 5px 15px 3px 15px;
      float: left;
      -webkit-border-top-left-radius: 8px;
      -khtml-border-radius-topleft: 8px;
      -moz-border-radius-topleft: 8px;
      border-top-left-radius: 8px;
      -webkit-border-top-right-radius: 8px;
      -khtml-border-radius-topright: 8px;
      -moz-border-radius-topright: 8px;
      border-top-right-radius: 8px;
    }

    .tabs ul li.active .tab {
      background-color: #{Config.active_tab_color};
      padding-bottom: 14px;
    }

    .tabs ul li a:hover {
      background-color: #{Config.hover_tab_color};
    }

    .tabs ul, .subtabs ul {
      /* float clearing */
      overflow: hidden;
      display: inline-block; /* Necessary to trigger "hasLayout" in IE */
      display: block; /* Sets element back to block */
    }

    .subtabs ul {
      margin-top: 5px;
    }

    .subtabs, .subtabs a, .subtabs a:visited {
      color: #{Config.text_color};
    }

    .subtabs li.active {
      font-weight: bold;
    }

    .subtabs a {
      text-decoration: none;
    }

    .subtabs ul {
      font-size: 16px;
      height: 30px;
      list-style-type: none;
      padding: 0 0 0 50px;
    }

    .subtabs ul li {
      padding: 10px;
      float: left;
    }

    .subtabs ul li a:hover {
      text-decoration: underline;
    }

    </style>
  }
end