patternfly-sass 1.3.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +3 -0
  3. data/README.md +1 -1
  4. data/Rakefile +21 -18
  5. data/assets/fonts/patternfly/PatternFlyIcons-webfont.eot +0 -0
  6. data/assets/fonts/patternfly/PatternFlyIcons-webfont.svg +40 -38
  7. data/assets/fonts/patternfly/PatternFlyIcons-webfont.ttf +0 -0
  8. data/assets/fonts/patternfly/PatternFlyIcons-webfont.woff +0 -0
  9. data/assets/javascripts/patternfly.js +111 -109
  10. data/assets/javascripts/patternfly.min.js +1 -1
  11. data/assets/stylesheets/_patternfly.scss +36 -40
  12. data/assets/stylesheets/patternfly/_alerts.scss +1 -1
  13. data/assets/stylesheets/patternfly/_bootstrap-datepicker-css.scss +752 -0
  14. data/assets/stylesheets/patternfly/_bootstrap-datepicker.scss +71 -0
  15. data/assets/stylesheets/patternfly/_bootstrap-select-css.scss +211 -257
  16. data/assets/stylesheets/patternfly/{c3-css.scss → _c3-css.scss} +0 -0
  17. data/assets/stylesheets/patternfly/_cards.scss +60 -0
  18. data/assets/stylesheets/patternfly/_icons.scss +18 -36
  19. data/assets/stylesheets/patternfly/_login.scss +0 -21
  20. data/assets/stylesheets/patternfly/_mixin_overrides.scss +4 -2
  21. data/assets/stylesheets/patternfly/_mixins.scss +16 -2
  22. data/assets/stylesheets/patternfly/_navbar.scss +0 -11
  23. data/assets/stylesheets/patternfly/_pagination.scss +2 -2
  24. data/assets/stylesheets/patternfly/_spinner.scss +12 -14
  25. data/assets/stylesheets/patternfly/_tooltip.scss +1 -2
  26. data/assets/stylesheets/patternfly/_variables.scss +12 -8
  27. data/bower.json +5 -3
  28. data/lib/patternfly-sass/version.rb +2 -2
  29. data/patternfly-sass.gemspec +3 -2
  30. data/spec/compare_spec.rb +17 -2
  31. data/spec/html/accordions.html +15 -12
  32. data/spec/html/alerts.html +15 -12
  33. data/spec/html/badges.html +15 -12
  34. data/spec/html/basic.html +437 -431
  35. data/spec/html/blank-slate.html +16 -13
  36. data/spec/html/bootstrap-combobox.html +15 -12
  37. data/spec/html/bootstrap-datepicker.html +72 -0
  38. data/spec/html/bootstrap-select.html +17 -17
  39. data/spec/html/bootstrap-treeview-2.html +87 -85
  40. data/spec/html/bootstrap-treeview.html +15 -15
  41. data/spec/html/breadcrumbs.html +15 -12
  42. data/spec/html/buttons.html +15 -12
  43. data/spec/html/cards.html +301 -0
  44. data/spec/html/charts.html +17 -14
  45. data/spec/html/code.html +15 -12
  46. data/spec/html/dashboard.html +18 -12
  47. data/spec/html/datatables-columns.html +434 -431
  48. data/spec/html/datatables.html +434 -431
  49. data/spec/html/dist/css/patternfly-additions.css +3394 -0
  50. data/spec/html/dist/css/patternfly-additions.css.map +1 -0
  51. data/spec/html/dist/css/patternfly-additions.min.css +2 -0
  52. data/spec/html/dist/css/patternfly-additions.min.css.map +1 -0
  53. data/spec/html/dist/css/patternfly.css +836 -2797
  54. data/spec/html/dist/css/patternfly.css.map +1 -0
  55. data/spec/html/dist/css/patternfly.min.css +7 -8
  56. data/spec/html/dist/css/patternfly.min.css.map +1 -0
  57. data/spec/html/dist/css/styles-additions.css +1 -0
  58. data/spec/html/dist/css/styles-additions.min.css +1 -0
  59. data/spec/html/dropdowns.html +15 -12
  60. data/spec/html/form.html +87 -86
  61. data/spec/html/forms.html +15 -12
  62. data/spec/html/icons.html +47 -38
  63. data/spec/html/index.html +21 -12
  64. data/spec/html/infotip.html +15 -12
  65. data/spec/html/labels.html +15 -12
  66. data/spec/html/list-group.html +15 -12
  67. data/spec/html/login.html +15 -12
  68. data/spec/html/modals.html +15 -12
  69. data/spec/html/navbar.html +77 -824
  70. data/spec/html/pagination.html +15 -12
  71. data/spec/html/panels.html +15 -12
  72. data/spec/html/popovers.html +25 -13
  73. data/spec/html/progress-bars.html +15 -12
  74. data/spec/html/search.html +15 -12
  75. data/spec/html/spinner.html +16 -13
  76. data/spec/html/tab.html +438 -432
  77. data/spec/html/tables.html +15 -12
  78. data/spec/html/tabs.html +15 -12
  79. data/spec/html/tooltip.html +15 -12
  80. data/spec/html/typography-2.html +18 -12
  81. data/spec/html/typography.html +15 -12
  82. data/tasks/converter.rb +24 -36
  83. metadata +44 -17
  84. data/spec/capture.js +0 -43
  85. data/spec/html/img/dashboard-1.png +0 -0
  86. data/spec/html/img/dashboard-2.png +0 -0
  87. data/spec/html/img/dashboard-4.png +0 -0
  88. data/spec/html/main.html +0 -16
@@ -0,0 +1,60 @@
1
+ //
2
+ // Cards
3
+ // --------------------------------------------------
4
+
5
+ .container-cards-pf {
6
+ margin-top: $grid-gutter-width/2;
7
+ }
8
+
9
+ .card-pf {
10
+ background: $card-pf-bg-color;
11
+ border-top: 2px solid $card-pf-border-top-color;
12
+ @include box-shadow(0 1px 1px rgba(0,0,0,.175));
13
+ padding: 0 $grid-gutter-width/2;
14
+ margin: 0 (-($grid-gutter-width/4)) $grid-gutter-width/2;
15
+ &.card-pf-accented {
16
+ border-top-color: $card-pf-accented-border-top-color;
17
+ }
18
+ }
19
+
20
+ .card-pf-body {
21
+ margin: $grid-gutter-width/2 0;
22
+ padding: 0 0 $grid-gutter-width/2;
23
+ > *:last-child {
24
+ margin-bottom: 0;
25
+ }
26
+ }
27
+
28
+ .card-pf-footer {
29
+ background-color: $card-pf-footer-bg-color;
30
+ border-top: 1px solid $card-pf-border-color;
31
+ margin: 0 (-($grid-gutter-width/2)) !important;
32
+ padding: $grid-gutter-width/2 $grid-gutter-width/2 $grid-gutter-width/4;
33
+ a > {
34
+ .fa, .pficon {
35
+ margin-right: 5px;
36
+ }
37
+ }
38
+ }
39
+
40
+ .card-pf-heading {
41
+ border-bottom: 1px solid $card-pf-border-color;
42
+ margin: 0 (-($grid-gutter-width/2)) $grid-gutter-width/2;
43
+ padding: 0 $grid-gutter-width/2 0;
44
+ }
45
+
46
+ .card-pf-title {
47
+ font-size: $font-size-h3;
48
+ font-weight: 300;
49
+ margin: $grid-gutter-width/2 0;
50
+ padding: 0;
51
+ }
52
+
53
+ .cards-pf {
54
+ background: $card-pf-container-bg-color;
55
+ }
56
+
57
+ .row-cards-pf {
58
+ margin-left: -($grid-gutter-width/4);
59
+ margin-right: -($grid-gutter-width/4);
60
+ }
@@ -14,10 +14,6 @@
14
14
  font-style: normal;
15
15
  }
16
16
 
17
- [class*="-exclamation"] {
18
- color: #fff;
19
- }
20
-
21
17
  [class^="#{$icon-prefix}-"], [class*=" #{$icon-prefix}-"] {
22
18
  display: inline-block;
23
19
  font-family: '#{$icon-font-name-pf}';
@@ -32,21 +28,6 @@
32
28
  -moz-osx-font-smoothing: grayscale;
33
29
  }
34
30
 
35
- .#{$icon-prefix}-layered {
36
- position: relative;
37
- .#{$icon-prefix}:first-child {
38
- position: absolute;
39
- z-index: 1;
40
- + .#{$icon-prefix} {
41
- position: relative;
42
- z-index: 2;
43
- }
44
- }
45
- }
46
-
47
- .#{$icon-prefix}-warning-exclamation:before {
48
- content: "\e60d";
49
- }
50
31
  .#{$icon-prefix}-screen:before {
51
32
  content: "\e600";
52
33
  }
@@ -73,32 +54,18 @@
73
54
  .#{$icon-prefix}-folder-close:before {
74
55
  content: "\e607";
75
56
  }
76
- .#{$icon-prefix}-error-exclamation:before {
77
- content: "\e608";
78
- }
79
- .#{$icon-prefix}-error-octagon:before {
80
- color: $brand-danger;
81
- content: "\e609";
82
- }
83
57
  .#{$icon-prefix}-edit:before {
84
58
  content: "\e60a";
85
59
  }
86
60
  .#{$icon-prefix}-close:before {
87
61
  content: "\e60b";
88
62
  }
89
- .#{$icon-prefix}-warning-triangle:before {
90
- color: $brand-warning;
91
- content: "\e60c";
92
- }
93
63
  .#{$icon-prefix}-user:before {
94
64
  content: "\e60e";
95
65
  }
96
66
  .#{$icon-prefix}-users:before {
97
67
  content: "\e60f";
98
68
  }
99
- .#{$icon-prefix}-add:before {
100
- content: "\e61a";
101
- }
102
69
  .#{$icon-prefix}-add-circle-o:before {
103
70
  content: "\e61b";
104
71
  }
@@ -144,12 +111,27 @@
144
111
  .#{$icon-prefix}-home:before {
145
112
  content: "\e618";
146
113
  }
147
- .#{$icon-prefix}-remove:before {
148
- content: "\e619";
149
- }
150
114
  .#{$icon-prefix}-cluster:before {
151
115
  content: "\e620";
152
116
  }
153
117
  .#{$icon-prefix}-container-node:before {
154
118
  content: "\e621";
119
+ }
120
+ .#{$icon-prefix}-project:before {
121
+ content: "\e622";
122
+ }
123
+ .#{$icon-prefix}-registry:before {
124
+ content: "\e623";
125
+ }
126
+ .#{$icon-prefix}-replicator:before {
127
+ content: "\e624";
128
+ }
129
+ .#{$icon-prefix}-route:before {
130
+ content: "\e625";
131
+ }
132
+ .#{$icon-prefix}-openshift:before {
133
+ content: "\e626";
134
+ }
135
+ .#{$icon-prefix}-kubernetes:before {
136
+ content: "\e627";
155
137
  }
@@ -98,24 +98,3 @@
98
98
  }
99
99
  }
100
100
  }
101
-
102
- .ie8.login-pf {
103
- #badge {
104
- background: url('#{$img-path}/#{$img-badge-ie8}') no-repeat;
105
- height: $img-badge-ie8-height;
106
- width: $img-badge-ie8-width;
107
- img {
108
- width: 0;
109
- }
110
- }
111
- #brand {
112
- background: url('#{$img-path-alt}/#{$img-brand-lg-ie8}') no-repeat center;
113
- background-size: cover auto;
114
- @media (min-width: $screen-sm-min) {
115
- background-position: 0 0;
116
- }
117
- img {
118
- width: 0;
119
- }
120
- }
121
- }
@@ -3,7 +3,8 @@
3
3
  // --------------------------------------------------
4
4
  // Bootstrap overrides and PatternFly-specific mixins
5
5
 
6
- /* Bootstrap overrides */
6
+ // Bootstrap overrides
7
+ // -------------------
7
8
 
8
9
 
9
10
 
@@ -39,7 +40,8 @@
39
40
  &::-webkit-input-placeholder { color: $color; font-style: italic; } // Safari and Chrome
40
41
  }
41
42
 
42
- /* PatternFly-specific */
43
+ // PatternFly-specific
44
+ // -------------------
43
45
 
44
46
  @mixin tab-indicator($background: $gray-light-pf, $left: 15px, $right: 15px) {
45
47
  &:before {
@@ -3,7 +3,8 @@
3
3
  // --------------------------------------------------
4
4
  // Bootstrap overrides and PatternFly-specific mixins
5
5
 
6
- /* Bootstrap overrides */
6
+ // Bootstrap overrides
7
+ // -------------------
7
8
 
8
9
  // Button variants
9
10
  @mixin button-variant($color, $background, $background-image-start, $background-image-stop, $border) {
@@ -30,9 +31,21 @@
30
31
  &:active,
31
32
  &.active {
32
33
  background-image: none;
34
+ &:hover,
35
+ &:focus,
36
+ &.focus {
37
+ background-color: darken($background, 5%);
38
+ border-color: darken($border, 7%);
39
+ }
33
40
  }
34
41
  .open & { &.dropdown-toggle {
35
42
  background-image: none;
43
+ &:hover,
44
+ &:focus,
45
+ &.focus {
46
+ background-color: darken($background, 5%);
47
+ border-color: darken($border, 7%);
48
+ }
36
49
  } }
37
50
  &.disabled,
38
51
  &[disabled],
@@ -80,7 +93,8 @@
80
93
  &::-webkit-input-placeholder { color: $color; font-style: italic; } // Safari and Chrome
81
94
  }
82
95
 
83
- /* PatternFly-specific */
96
+ // PatternFly-specific
97
+ // -------------------
84
98
 
85
99
  @mixin tab-indicator($background: $gray-light-pf, $left: 15px, $right: 15px) {
86
100
  &:before {
@@ -14,16 +14,8 @@
14
14
  height: auto;
15
15
  padding: 12px 0;
16
16
  margin: 0 0 0 20px;
17
- .ie8 & {
18
- background: url('#{$img-path}/#{$img-brand-ie8}') no-repeat 0 49%;
19
- min-width: $navbar-pf-navbar-navbar-brand-min-width;
20
- }
21
17
  img {
22
18
  display: block;
23
- .ie8 & {
24
- height: 10px;
25
- width: 0;
26
- }
27
19
  }
28
20
  }
29
21
  .navbar-collapse {
@@ -404,9 +396,6 @@
404
396
  &.context-bootstrap-select .filter-option {
405
397
  max-width: 160px;
406
398
  text-overflow: ellipsis;
407
- .ie8 & {
408
- max-width: none;
409
- }
410
399
  }
411
400
  &.dropdown {
412
401
  border-bottom: 0;
@@ -50,14 +50,14 @@
50
50
  }
51
51
 
52
52
  .pagination-sm {
53
- @include pagination-size($pagination-padding-small-vertical, $padding-small-horizontal, $font-size-small, $border-radius-small);
53
+ @include pagination-size($padding-small-vertical, $padding-small-horizontal, $font-size-small, $line-height-small, $border-radius-small);
54
54
  > li {
55
55
  > a,
56
56
  > span {
57
57
  font-weight: 400;
58
58
  > .i {
59
59
  font-size: 12px;
60
- margin-top: 3px;
60
+ margin-top: 2px;
61
61
  }
62
62
  }
63
63
  }
@@ -45,18 +45,16 @@
45
45
  }
46
46
  }
47
47
 
48
- .ie8, .ie9 {
49
- .spinner {
50
- background: url("#{$img-path}/#{$img-spinner}") no-repeat;
51
- border: 0;
52
- &.spinner-lg {
53
- background-image: url("#{$img-path}/#{$img-spinner-lg}");
54
- }
55
- &.spinner-sm {
56
- background-image: url("#{$img-path}/#{$img-spinner-sm}");
57
- }
58
- &.spinner-xs {
59
- background-image: url("#{$img-path}/#{$img-spinner-xs}");
60
- }
48
+ .ie9 .spinner {
49
+ background: url("#{$img-path}/#{$img-spinner}") no-repeat;
50
+ border: 0;
51
+ &.spinner-lg {
52
+ background-image: url("#{$img-path}/#{$img-spinner-lg}");
53
+ }
54
+ &.spinner-sm {
55
+ background-image: url("#{$img-path}/#{$img-spinner-sm}");
61
56
  }
62
- }
57
+ &.spinner-xs {
58
+ background-image: url("#{$img-path}/#{$img-spinner-xs}");
59
+ }
60
+ }
@@ -5,8 +5,7 @@
5
5
  // Base class
6
6
  .tooltip {
7
7
  font-size: $tooltip-font-size;
8
-
9
- &.in { @include opacity(.88); }
8
+ line-height: 1.4
10
9
  }
11
10
 
12
11
  // Wrapper for the tooltip content
@@ -4,10 +4,17 @@ $patternfly-sass-asset-helper: false !default;
4
4
  // --------------------------------------------------
5
5
  // Bootstrap overrides and PatternFly-specific variables
6
6
 
7
- /* PatternFly specific */
7
+ // PatternFly-specific
8
+ // -------------------
8
9
  $btn-default-bg-img-start: #fafafa !default;
9
10
  $btn-default-bg-img-stop: #ededed !default;
10
11
  $btn-xs-font-weight: 400 !default;
12
+ $card-pf-accented-border-top-color: #39a5dc !default;
13
+ $card-pf-bg-color: #fff !default;
14
+ $card-pf-border-color: #d1d1d1 !default;
15
+ $card-pf-border-top-color: transparent !default;
16
+ $card-pf-container-bg-color: #f5f5f5 !default;
17
+ $card-pf-footer-bg-color: #fafafa !default;
11
18
  $dropdown-divider-margin: 4px 1px !default;
12
19
  $dropdown-link-active-border-color: #0076b7 !default;
13
20
  $dropdown-link-hover-border-color: #b3d3e7 !default;
@@ -19,12 +26,7 @@ $gray-pf: #4d5258 !def
19
26
  $icon-font-name-fa: "FontAwesome" !default;
20
27
  $icon-font-name-pf: "PatternFlyIcons-webfont" !default;
21
28
  $icon-prefix: pficon !default;
22
- $img-badge-ie8: "logo.png" !default;
23
- $img-badge-ie8-height: 69px !default;
24
- $img-badge-ie8-width: 73px !default;
25
29
  $img-bg-login: "bg-login.jpg" !default;
26
- $img-brand-ie8: "brand.png" !default;
27
- $img-brand-lg-ie8: "brand-lg.png" !default;
28
30
  $img-path: if($patternfly-sass-asset-helper, "patternfly", "../images/patternfly") !default;
29
31
  $img-spinner: "spinner.gif" !default;
30
32
  $img-spinner-lg: "spinner-lg.gif" !default;
@@ -94,7 +96,8 @@ $navbar-pf-navbar-primary-context-active-border-top-color: lighten($nav
94
96
  $navbar-pf-navbar-primary-context-active-border-right-color: $navbar-pf-navbar-primary-context-active-border-color !default;
95
97
 
96
98
 
97
- /* Bootstrap overrides */
99
+ // Bootstrap overrides
100
+ // -------------------
98
101
  $alert-info-border: #ccc !default;
99
102
  $alert-link-font-weight: 500 !default;
100
103
  $alert-padding: 7px !default;
@@ -209,7 +212,8 @@ $panel-info-text: $panel-prima
209
212
  $panel-success-text: $panel-primary-text !default;
210
213
  $panel-warning-text: $panel-primary-text !default;
211
214
 
212
- /* PatternFly-specific variables based on Bootstrap overides */
215
+ // PatternFly-specific variables based on Bootstrap overides
216
+ // ---------------------------------------------------------
213
217
  $btn-danger-bg-img-start: $brand-danger !default;
214
218
  $btn-danger-bg-img-stop: $btn-danger-bg !default;
215
219
  $btn-primary-bg-img-start: $brand-primary !default;
data/bower.json CHANGED
@@ -17,12 +17,14 @@
17
17
  ],
18
18
  "devDependencies": {
19
19
  "bootstrap-combobox": "~1.1.6",
20
- "bootstrap-select": "~1.5.4",
21
- "bootstrap-treeview": "~1.0.1",
20
+ "bootstrap-datepicker": "~1.4.0",
21
+ "bootstrap-select": "~1.7.3",
22
+ "bootstrap-treeview": "~1.2.0",
22
23
  "c3": "~0.4.10",
23
24
  "datatables": "~1.10.7",
24
25
  "datatables-colreorder": "~1.1.3",
25
26
  "datatables-colvis": "~1.1.2",
26
- "google-code-prettify": "~1.0.3"
27
+ "google-code-prettify": "~1.0.4",
28
+ "matchHeight": "~0.6.0"
27
29
  }
28
30
  }
@@ -1,4 +1,4 @@
1
1
  module Patternfly
2
- VERSION = '1.3.1'
3
- PATTERNFLY_SHA = '3788ee1f5e9f0ae4061925e671d83572f7bf2a1e'
2
+ VERSION = '2.0.0'
3
+ PATTERNFLY_SHA = 'bf1749e83367af53dcdd880668643171c844bc58'
4
4
  end
@@ -11,8 +11,8 @@ Gem::Specification.new do |s|
11
11
  s.homepage = "https://github.com/Patternfly/patternfly-sass"
12
12
  s.license = 'Apache-2.0'
13
13
 
14
- s.add_runtime_dependency 'sass', '~> 3.2'
15
- s.add_runtime_dependency 'bootstrap-sass', '~> 3.3.4.1'
14
+ s.add_runtime_dependency 'sass', '~> 3.4.15'
15
+ s.add_runtime_dependency 'bootstrap-sass', '~> 3.3.5'
16
16
  s.add_runtime_dependency 'font-awesome-sass', '~> 4.3.0'
17
17
 
18
18
  # Converter's dependencies
@@ -23,6 +23,7 @@ Gem::Specification.new do |s|
23
23
  s.add_development_dependency 'nokogiri', '~> 1.6'
24
24
  s.add_development_dependency 'rmagick', '~> 2.15'
25
25
  s.add_development_dependency 'imgur-api', '~> 0.0.4'
26
+ s.add_development_dependency 'selenium-webdriver', '~> 2.46'
26
27
 
27
28
  s.files = `git ls-files`.split("\n")
28
29
  s.test_files = `git ls-files -- spec/*`.split("\n")
@@ -1,6 +1,7 @@
1
1
  require 'net/http'
2
2
  require 'nokogiri'
3
3
  require 'rmagick'
4
+ require 'selenium-webdriver'
4
5
 
5
6
  RSpec.describe "compare SASS with LESS screenshots" do
6
7
  BASEURL = "http://localhost:9000"
@@ -11,6 +12,8 @@ RSpec.describe "compare SASS with LESS screenshots" do
11
12
  # See https://github.com/sass/sass/issues/1732
12
13
  TOLERANCE = 0.05
13
14
 
15
+ driver = Selenium::WebDriver.for(:firefox)
16
+
14
17
  # Give some time for the testing server to start
15
18
  html = nil
16
19
  5.times do |t|
@@ -25,10 +28,18 @@ RSpec.describe "compare SASS with LESS screenshots" do
25
28
  file = link['href']
26
29
  context "#{file}" do
27
30
  title = file.sub('.html', '')
28
- RESOLUTIONS.each do |w,h|
31
+ RESOLUTIONS.each do |w, h|
29
32
  it "#{w}x#{h}" do
33
+ driver.manage.window.resize_to(w, h)
30
34
  CONTEXTS.each do |ctx|
31
- `phantomjs spec/capture.js #{w} #{h} #{BASEURL}/#{ctx}/patternfly/#{file} spec/results/#{ctx}/#{title}-#{w}x#{h}.png`
35
+ driver.navigate.to("#{BASEURL}/#{ctx}/patternfly/#{file}")
36
+ driver.execute_script("
37
+ var style = document.createElement('style');
38
+ style.innerHTML = '* { -moz-animation: none !important; -moz-transition: none !important;';
39
+ document.body.appendChild(style);
40
+ ")
41
+ sleep(1)
42
+ driver.save_screenshot("spec/results/#{ctx}/#{title}-#{w}x#{h}.png")
32
43
  end
33
44
  img_less = Magick::Image.read("spec/results/less/#{title}-#{w}x#{h}.png").first
34
45
  img_sass = Magick::Image.read("spec/results/sass/#{title}-#{w}x#{h}.png").first
@@ -50,4 +61,8 @@ RSpec.describe "compare SASS with LESS screenshots" do
50
61
  end
51
62
  end
52
63
  end
64
+
65
+ after(:all) do
66
+ driver.quit
67
+ end
53
68
  end