maily 0.7.1 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4d04efbf8deab269bdfd889cc251b73b91c891b0
4
- data.tar.gz: 4a8714c648898f417898417e0d91fede4c35b8eb
3
+ metadata.gz: 50e254d6048356a08a30e2175e4bc1809c9cccc7
4
+ data.tar.gz: 799e7de87f596fe17ed4981f8025ee1156639e4f
5
5
  SHA512:
6
- metadata.gz: 233ce105c646910c4f71f76979debba629942fb1250005c2395d82b8d45d2be5b99bcd3e05f94e7d9a8a5b53b1df408945603a770e5ef7981ae3e490d30214e8
7
- data.tar.gz: 1f3254b68cafaa2d1bc0fa1b2d93f7853d149994a30d9dfc67e9183ee83e429afc5e993d28000832ca70c86ab52416cc49de37ee3cfa0c97a435061f3dbdc226
6
+ metadata.gz: 1c870ea516edd08cfb71cb46519784009e0945b905ff6e85fdb559468042bffae144bf7c8227e9555cb4415164481f6b3c3d76f22124a7bc61905db3ad91236f
7
+ data.tar.gz: 17dd9afc7e7b4024bb1789771c07a0946e32d8a70b150560b1ec365c31b4cb46661bcb3a87d11ce10e595bbfd814e9dfd5f4f8de01d12c97d2a34d04bd2d7560
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.7.2]
6
+
7
+ - Definitive fix for newer apps using `webpacker` and without `sass-rails` (#22)
8
+ - Fix regression in generator, from v0.7.0 (#24)
9
+ - Allow to edit emails with different templates engines: Slim, Haml, ... (#25)
10
+
5
11
  ## [0.7.1]
6
12
 
7
13
  - Fix assets pipeline integration for applications using `webpacker` instead of `sprockets` (#22)
@@ -79,6 +85,7 @@ All notable changes to this project will be documented in this file.
79
85
 
80
86
  - First real usable release :tada:
81
87
 
88
+ [0.7.2]: https://github.com/markets/maily/compare/v0.7.1...v0.7.2
82
89
  [0.7.1]: https://github.com/markets/maily/compare/v0.7.0...v0.7.1
83
90
  [0.7.0]: https://github.com/markets/maily/compare/v0.6.3...v0.7.0
84
91
  [0.6.3]: https://github.com/markets/maily/compare/v0.6.2...v0.6.3
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Maily
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/maily.svg)](http://badge.fury.io/rb/maily) [![Build Status](https://travis-ci.org/markets/maily.svg?branch=master)](https://travis-ci.org/markets/maily)
3
+ [![Gem Version](https://badge.fury.io/rb/maily.svg)](http://badge.fury.io/rb/maily)
4
+ [![Build Status](https://travis-ci.org/markets/maily.svg?branch=master)](https://travis-ci.org/markets/maily)
5
+ [![Maintainability](https://api.codeclimate.com/v1/badges/fff01b2137fd73070b14/maintainability)](https://codeclimate.com/github/markets/maily/maintainability)
4
6
 
5
7
  Maily is a Rails Engine to manage, test and navigate through all your email templates of your app, being able to preview them directly in your browser.
6
8
 
@@ -1,4 +1,3 @@
1
- @import "maily/normalize";
2
1
  @import "maily/variables";
3
2
 
4
3
  /* Title font */
@@ -26,6 +25,8 @@ body {
26
25
 
27
26
  /* Inputs */
28
27
  input {
28
+ font-size: 100%;
29
+ font-family: inherit;
29
30
  height: 1.2em;
30
31
  border: solid 1px $grey;
31
32
  border-radius: 2px;
@@ -57,7 +57,7 @@ module Maily
57
57
  end
58
58
 
59
59
  def load_mailers
60
- @mailers = Maily::Mailer.all.values
60
+ @mailers = Maily::Mailer.list
61
61
  end
62
62
 
63
63
  def load_mailer_and_email
@@ -1,9 +1,9 @@
1
1
  <aside class="sidebar">
2
- <% @mailers.sort_by(&:name).each do |mailer| %>
2
+ <% @mailers.each do |mailer| %>
3
3
  <section class="nav_list">
4
4
  <h3 class="nav_title"><%= "#{mailer.name.humanize} (#{mailer.total_emails})" %></h3>
5
5
  <ul>
6
- <% mailer.emails.values.sort_by(&:name).each do |email| %>
6
+ <% mailer.emails_list.each do |email| %>
7
7
  <li><%= link_to email.name.humanize, maily_email_path(mailer: mailer.name, email: email.name), class: sidebar_class(mailer, email) %></li>
8
8
  <% end %>
9
9
  </ul>
@@ -5,9 +5,11 @@ module Maily
5
5
  source_root File.expand_path("../../templates", __FILE__)
6
6
 
7
7
  def install
8
+ puts "==> Installing Maily components ..."
8
9
  generate_routing
9
- build_initializer
10
+ copy_initializer
10
11
  build_hooks
12
+ puts "Ready! You can now access Maily at /maily"
11
13
  end
12
14
 
13
15
  private
@@ -16,29 +18,13 @@ module Maily
16
18
  route "mount Maily::Engine, at: '/maily'"
17
19
  end
18
20
 
19
- def build_initializer
21
+ def copy_initializer
20
22
  template 'initializer.rb', 'config/initializers/maily.rb'
21
23
  end
22
24
 
23
25
  def build_hooks
24
- Maily.init!
25
-
26
- fixtures = []
27
- hooks = []
28
-
29
- Maily::Mailer.all.each do |mailer|
30
- hooks << "\nMaily.hooks_for('#{mailer.name.classify}') do |mailer|"
31
- mailer.emails.each do |email|
32
- if email.require_hook?
33
- fixtures << email.required_arguments
34
- hooks << " mailer.register_hook(:#{email.name}, #{email.required_arguments.join(', ')})"
35
- end
36
- end
37
- hooks << "end"
38
- end
39
-
40
26
  create_file "lib/maily_hooks.rb" do
41
- fixtures.flatten.uniq.map{ |f| f = "#{f.to_s} = ''" }.join("\n") + "\n" + hooks.join("\n") + "\n"
27
+ Maily::Generator.run
42
28
  end
43
29
  end
44
30
  end
@@ -1,7 +1,8 @@
1
- require 'maily/engine'
2
1
  require 'maily/version'
2
+ require 'maily/engine'
3
3
  require 'maily/mailer'
4
4
  require 'maily/email'
5
+ require 'maily/generator'
5
6
 
6
7
  module Maily
7
8
  class << self
@@ -33,6 +34,8 @@ module Maily
33
34
 
34
35
  def hooks_for(mailer_name)
35
36
  mailer = Maily::Mailer.find(mailer_name.underscore)
37
+ return unless mailer
38
+
36
39
  yield(mailer) if block_given?
37
40
  end
38
41
 
@@ -76,18 +76,17 @@ module Maily
76
76
  end
77
77
 
78
78
  def base_path(part)
79
- "#{Rails.root}/app/views/#{template_path}/#{template_name}.#{part}.erb"
79
+ Dir["#{Rails.root}/app/views/#{template_path}/#{template_name}.#{part}.*"].first
80
80
  end
81
81
 
82
82
  def path(part = nil)
83
- if part
84
- base_path(part)
83
+ return base_path(part) if part
84
+
85
+ html_part = base_path('html')
86
+ if html_part && File.exist?(html_part)
87
+ html_part
85
88
  else
86
- if File.exist?(path('html'))
87
- base_path('html')
88
- else
89
- base_path('text')
90
- end
89
+ base_path('text')
91
90
  end
92
91
  end
93
92
 
@@ -0,0 +1,26 @@
1
+ module Maily
2
+ module Generator
3
+ def self.run
4
+ Maily.init!
5
+
6
+ fixtures = []
7
+ hooks = []
8
+
9
+ Maily::Mailer.list.each do |mailer|
10
+ hooks << "\nMaily.hooks_for('#{mailer.name.classify}') do |mailer|"
11
+ mailer.emails_list.each do |email|
12
+ if email.require_hook?
13
+ fixtures << email.required_arguments
14
+ hooks << " mailer.register_hook(:#{email.name}, #{email.required_arguments.join(', ')})"
15
+ end
16
+ end
17
+ hooks << "end"
18
+ end
19
+
20
+ fixtures = fixtures.flatten.uniq.map { |f| "#{f.to_s} = ''" }.join("\n")
21
+ hooks = hooks.join("\n")
22
+
23
+ fixtures + "\n" + hooks + "\n"
24
+ end
25
+ end
26
+ end
@@ -19,6 +19,10 @@ module Maily
19
19
  collection
20
20
  end
21
21
 
22
+ def self.list
23
+ all.values.sort_by(&:name)
24
+ end
25
+
22
26
  def self.find(mailer_name)
23
27
  all[mailer_name]
24
28
  end
@@ -27,6 +31,10 @@ module Maily
27
31
  emails[email_name.to_s]
28
32
  end
29
33
 
34
+ def emails_list
35
+ emails.values.sort_by(&:name)
36
+ end
37
+
30
38
  def total_emails
31
39
  emails.size
32
40
  end
@@ -1,3 +1,3 @@
1
1
  module Maily
2
- VERSION = "0.7.1"
2
+ VERSION = "0.7.2"
3
3
  end
Binary file
@@ -20,4 +20,12 @@ class Notifier < ActionMailer::Base
20
20
  def hidden
21
21
  mail
22
22
  end
23
+
24
+ def multipart
25
+ mail
26
+ end
27
+
28
+ def with_slim_template
29
+ mail
30
+ end
23
31
  end
@@ -0,0 +1 @@
1
+ <h1>Multipart HTML</h1>
@@ -0,0 +1 @@
1
+ Multipart plain text
@@ -0,0 +1 @@
1
+ p Hi from a Slim template
@@ -31,6 +31,7 @@ describe Maily::Email do
31
31
 
32
32
  it 'should handle not lazy arguments successfully' do
33
33
  allow(email).to receive(:email).and_return('foo@foo.com')
34
+
34
35
  expect(email.arguments).to be_present
35
36
  expect(email.arguments.size).to eq(email.required_arguments.size)
36
37
  end
@@ -42,20 +43,23 @@ describe Maily::Email do
42
43
 
43
44
  it "should handle template_path via hook" do
44
45
  email = mailer.find_email('recommendation')
46
+
45
47
  expect(email.template_path).to eq('notifications')
46
48
  end
47
49
 
48
50
  it "should handle template_name via hook" do
49
51
  email = mailer.find_email('custom_template_name')
52
+
50
53
  expect(email.template_name).to eq('invitation')
51
54
  end
52
55
 
53
56
  it "should handle description via hook" do
54
57
  email = mailer.find_email('recommendation')
58
+
55
59
  expect(email.description).to eq('description')
56
60
  end
57
61
 
58
- describe 'validate_arguments' do
62
+ describe '#validate_arguments' do
59
63
  it 'emails with no arguments required' do
60
64
  email = mailer.find_email('welcome')
61
65
  expect(email.validate_arguments).to eq [true, nil]
@@ -72,4 +76,20 @@ describe Maily::Email do
72
76
  expect(email.validate_arguments[1]).to eq("recommendation email requires at least 1 arguments, passed 0")
73
77
  end
74
78
  end
79
+
80
+ describe '#path' do
81
+ it 'with a multipart email defaults to html' do
82
+ email = mailer.find_email('multipart')
83
+
84
+ expect(email.path).to include('multipart.html.erb')
85
+ expect(email.path('text')).to include('multipart.text.erb')
86
+ expect(email.path('foo')).to eq nil
87
+ end
88
+
89
+ it 'with other template engines (e.g. Slim)' do
90
+ email = mailer.find_email('with_slim_template')
91
+
92
+ expect(email.path).to include('with_slim_template.html.slim')
93
+ end
94
+ end
75
95
  end
@@ -0,0 +1,14 @@
1
+ require 'spec_helper'
2
+
3
+ describe Maily::Generator do
4
+ it '.run generates valid fixtures and hooks for current application' do
5
+ expect(Maily::Generator.run).to eq <<-HOOKS.strip_heredoc
6
+ email = ''
7
+
8
+ Maily.hooks_for('Notifier') do |mailer|
9
+ mailer.register_hook(:invitation, email)
10
+ mailer.register_hook(:recommendation, email)
11
+ end
12
+ HOOKS
13
+ end
14
+ end
@@ -2,12 +2,13 @@ require 'spec_helper'
2
2
 
3
3
  describe Maily::Mailer do
4
4
  it "should load mailers" do
5
- expect(Maily::Mailer.all.size).to eq(1)
5
+ expect(Maily::Mailer.all.keys).to eq(['notifier'])
6
6
  end
7
7
 
8
8
  it "should build emails" do
9
9
  mailer = Maily::Mailer.find('notifier')
10
- expect(mailer.emails.size).to eq(4)
10
+
11
+ expect(mailer.emails.size).to eq(6)
11
12
  end
12
13
 
13
14
  it "should find mailers by name" do
@@ -16,11 +17,27 @@ describe Maily::Mailer do
16
17
 
17
18
  it "should find emails by name" do
18
19
  mailer = Maily::Mailer.find('notifier')
20
+
19
21
  expect(mailer.find_email('welcome').name).to eq('welcome')
20
22
  end
21
23
 
22
24
  it "allows to hide email" do
23
25
  mailer = Maily::Mailer.find('notifier')
26
+
24
27
  expect(mailer.find_email('hidden')).to be nil
25
28
  end
29
+
30
+ it ".list returns an array with all mailers" do
31
+ list = Maily::Mailer.list
32
+
33
+ expect(list).to be_an_instance_of(Array)
34
+ expect(list.sample).to be_an_instance_of(Maily::Mailer)
35
+ end
36
+
37
+ it "#emails_list returns an array with all emails" do
38
+ mailer = Maily::Mailer.find('notifier')
39
+
40
+ expect(mailer.emails_list).to be_an_instance_of(Array)
41
+ expect(mailer.emails_list.sample).to be_an_instance_of(Maily::Email)
42
+ end
26
43
  end
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Maily do
4
- it "should initialize with some defaults if no block is provided" do
4
+ it "#setup should initialize with some defaults if no block is provided" do
5
5
  Maily.setup
6
6
 
7
7
  expect(Maily.enabled).to be true
@@ -12,16 +12,18 @@ describe Maily do
12
12
  expect(Maily.http_authorization).to be nil
13
13
  end
14
14
 
15
- it "should not allow edition if edition is disabled" do
16
- Maily.allow_edition = false
15
+ describe '#allowed_action?' do
16
+ it "should not allow edition if edition is disabled" do
17
+ Maily.allow_edition = false
17
18
 
18
- expect(Maily.allowed_action?(:edit)).to be false
19
- expect(Maily.allowed_action?(:update)).to be false
20
- end
19
+ expect(Maily.allowed_action?(:edit)).to be false
20
+ expect(Maily.allowed_action?(:update)).to be false
21
+ end
21
22
 
22
- it "should not allow delivery if delivery is disabled" do
23
- Maily.allow_delivery = false
23
+ it "should not allow delivery if delivery is disabled" do
24
+ Maily.allow_delivery = false
24
25
 
25
- expect(Maily.allowed_action?(:deliver)).to be false
26
+ expect(Maily.allowed_action?(:deliver)).to be false
27
+ end
26
28
  end
27
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maily
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - markets
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-21 00:00:00.000000000 Z
11
+ date: 2018-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -103,7 +103,6 @@ files:
103
103
  - app/assets/javascripts/maily/application.js
104
104
  - app/assets/stylesheets/maily/_variables.scss
105
105
  - app/assets/stylesheets/maily/application.scss
106
- - app/assets/stylesheets/maily/normalize.css
107
106
  - app/controllers/maily/application_controller.rb
108
107
  - app/controllers/maily/emails_controller.rb
109
108
  - app/helpers/maily/application_helper.rb
@@ -126,6 +125,7 @@ files:
126
125
  - lib/maily.rb
127
126
  - lib/maily/email.rb
128
127
  - lib/maily/engine.rb
128
+ - lib/maily/generator.rb
129
129
  - lib/maily/mailer.rb
130
130
  - lib/maily/version.rb
131
131
  - maily.gemspec
@@ -145,7 +145,10 @@ files:
145
145
  - spec/dummy/app/views/layouts/application.html.erb
146
146
  - spec/dummy/app/views/notifications/recommendation.html.erb
147
147
  - spec/dummy/app/views/notifier/invitation.html.erb
148
+ - spec/dummy/app/views/notifier/multipart.html.erb
149
+ - spec/dummy/app/views/notifier/multipart.text.erb
148
150
  - spec/dummy/app/views/notifier/welcome.html.erb
151
+ - spec/dummy/app/views/notifier/with_slim_template.html.slim
149
152
  - spec/dummy/bin/bundle
150
153
  - spec/dummy/bin/rails
151
154
  - spec/dummy/bin/rake
@@ -173,6 +176,7 @@ files:
173
176
  - spec/dummy/public/500.html
174
177
  - spec/dummy/public/favicon.ico
175
178
  - spec/email_spec.rb
179
+ - spec/generator_spec.rb
176
180
  - spec/mailer_spec.rb
177
181
  - spec/maily_spec.rb
178
182
  - spec/spec_helper.rb
@@ -216,7 +220,10 @@ test_files:
216
220
  - spec/dummy/app/views/layouts/application.html.erb
217
221
  - spec/dummy/app/views/notifications/recommendation.html.erb
218
222
  - spec/dummy/app/views/notifier/invitation.html.erb
223
+ - spec/dummy/app/views/notifier/multipart.html.erb
224
+ - spec/dummy/app/views/notifier/multipart.text.erb
219
225
  - spec/dummy/app/views/notifier/welcome.html.erb
226
+ - spec/dummy/app/views/notifier/with_slim_template.html.slim
220
227
  - spec/dummy/bin/bundle
221
228
  - spec/dummy/bin/rails
222
229
  - spec/dummy/bin/rake
@@ -244,6 +251,7 @@ test_files:
244
251
  - spec/dummy/public/500.html
245
252
  - spec/dummy/public/favicon.ico
246
253
  - spec/email_spec.rb
254
+ - spec/generator_spec.rb
247
255
  - spec/mailer_spec.rb
248
256
  - spec/maily_spec.rb
249
257
  - spec/spec_helper.rb
@@ -1,341 +0,0 @@
1
- /*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
2
-
3
- /* Document
4
- ========================================================================== */
5
-
6
- /**
7
- * 1. Correct the line height in all browsers.
8
- * 2. Prevent adjustments of font size after orientation changes in iOS.
9
- */
10
-
11
- html {
12
- line-height: 1.15; /* 1 */
13
- -webkit-text-size-adjust: 100%; /* 2 */
14
- }
15
-
16
- /* Sections
17
- ========================================================================== */
18
-
19
- /**
20
- * Remove the margin in all browsers.
21
- */
22
-
23
- body {
24
- margin: 0;
25
- }
26
-
27
- /**
28
- * Correct the font size and margin on `h1` elements within `section` and
29
- * `article` contexts in Chrome, Firefox, and Safari.
30
- */
31
-
32
- h1 {
33
- font-size: 2em;
34
- margin: 0.67em 0;
35
- }
36
-
37
- /* Grouping content
38
- ========================================================================== */
39
-
40
- /**
41
- * 1. Add the correct box sizing in Firefox.
42
- * 2. Show the overflow in Edge and IE.
43
- */
44
-
45
- hr {
46
- box-sizing: content-box; /* 1 */
47
- height: 0; /* 1 */
48
- overflow: visible; /* 2 */
49
- }
50
-
51
- /**
52
- * 1. Correct the inheritance and scaling of font size in all browsers.
53
- * 2. Correct the odd `em` font sizing in all browsers.
54
- */
55
-
56
- pre {
57
- font-family: monospace, monospace; /* 1 */
58
- font-size: 1em; /* 2 */
59
- }
60
-
61
- /* Text-level semantics
62
- ========================================================================== */
63
-
64
- /**
65
- * Remove the gray background on active links in IE 10.
66
- */
67
-
68
- a {
69
- background-color: transparent;
70
- }
71
-
72
- /**
73
- * 1. Remove the bottom border in Chrome 57-
74
- * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
75
- */
76
-
77
- abbr[title] {
78
- border-bottom: none; /* 1 */
79
- text-decoration: underline; /* 2 */
80
- text-decoration: underline dotted; /* 2 */
81
- }
82
-
83
- /**
84
- * Add the correct font weight in Chrome, Edge, and Safari.
85
- */
86
-
87
- b,
88
- strong {
89
- font-weight: bolder;
90
- }
91
-
92
- /**
93
- * 1. Correct the inheritance and scaling of font size in all browsers.
94
- * 2. Correct the odd `em` font sizing in all browsers.
95
- */
96
-
97
- code,
98
- kbd,
99
- samp {
100
- font-family: monospace, monospace; /* 1 */
101
- font-size: 1em; /* 2 */
102
- }
103
-
104
- /**
105
- * Add the correct font size in all browsers.
106
- */
107
-
108
- small {
109
- font-size: 80%;
110
- }
111
-
112
- /**
113
- * Prevent `sub` and `sup` elements from affecting the line height in
114
- * all browsers.
115
- */
116
-
117
- sub,
118
- sup {
119
- font-size: 75%;
120
- line-height: 0;
121
- position: relative;
122
- vertical-align: baseline;
123
- }
124
-
125
- sub {
126
- bottom: -0.25em;
127
- }
128
-
129
- sup {
130
- top: -0.5em;
131
- }
132
-
133
- /* Embedded content
134
- ========================================================================== */
135
-
136
- /**
137
- * Remove the border on images inside links in IE 10.
138
- */
139
-
140
- img {
141
- border-style: none;
142
- }
143
-
144
- /* Forms
145
- ========================================================================== */
146
-
147
- /**
148
- * 1. Change the font styles in all browsers.
149
- * 2. Remove the margin in Firefox and Safari.
150
- */
151
-
152
- button,
153
- input,
154
- optgroup,
155
- select,
156
- textarea {
157
- font-family: inherit; /* 1 */
158
- font-size: 100%; /* 1 */
159
- line-height: 1.15; /* 1 */
160
- margin: 0; /* 2 */
161
- }
162
-
163
- /**
164
- * Show the overflow in IE.
165
- * 1. Show the overflow in Edge.
166
- */
167
-
168
- button,
169
- input { /* 1 */
170
- overflow: visible;
171
- }
172
-
173
- /**
174
- * Remove the inheritance of text transform in Edge, Firefox, and IE.
175
- * 1. Remove the inheritance of text transform in Firefox.
176
- */
177
-
178
- button,
179
- select { /* 1 */
180
- text-transform: none;
181
- }
182
-
183
- /**
184
- * Correct the inability to style clickable types in iOS and Safari.
185
- */
186
-
187
- button,
188
- [type="button"],
189
- [type="reset"],
190
- [type="submit"] {
191
- -webkit-appearance: button;
192
- }
193
-
194
- /**
195
- * Remove the inner border and padding in Firefox.
196
- */
197
-
198
- button::-moz-focus-inner,
199
- [type="button"]::-moz-focus-inner,
200
- [type="reset"]::-moz-focus-inner,
201
- [type="submit"]::-moz-focus-inner {
202
- border-style: none;
203
- padding: 0;
204
- }
205
-
206
- /**
207
- * Restore the focus styles unset by the previous rule.
208
- */
209
-
210
- button:-moz-focusring,
211
- [type="button"]:-moz-focusring,
212
- [type="reset"]:-moz-focusring,
213
- [type="submit"]:-moz-focusring {
214
- outline: 1px dotted ButtonText;
215
- }
216
-
217
- /**
218
- * Correct the padding in Firefox.
219
- */
220
-
221
- fieldset {
222
- padding: 0.35em 0.75em 0.625em;
223
- }
224
-
225
- /**
226
- * 1. Correct the text wrapping in Edge and IE.
227
- * 2. Correct the color inheritance from `fieldset` elements in IE.
228
- * 3. Remove the padding so developers are not caught out when they zero out
229
- * `fieldset` elements in all browsers.
230
- */
231
-
232
- legend {
233
- box-sizing: border-box; /* 1 */
234
- color: inherit; /* 2 */
235
- display: table; /* 1 */
236
- max-width: 100%; /* 1 */
237
- padding: 0; /* 3 */
238
- white-space: normal; /* 1 */
239
- }
240
-
241
- /**
242
- * Add the correct vertical alignment in Chrome, Firefox, and Opera.
243
- */
244
-
245
- progress {
246
- vertical-align: baseline;
247
- }
248
-
249
- /**
250
- * Remove the default vertical scrollbar in IE 10+.
251
- */
252
-
253
- textarea {
254
- overflow: auto;
255
- }
256
-
257
- /**
258
- * 1. Add the correct box sizing in IE 10.
259
- * 2. Remove the padding in IE 10.
260
- */
261
-
262
- [type="checkbox"],
263
- [type="radio"] {
264
- box-sizing: border-box; /* 1 */
265
- padding: 0; /* 2 */
266
- }
267
-
268
- /**
269
- * Correct the cursor style of increment and decrement buttons in Chrome.
270
- */
271
-
272
- [type="number"]::-webkit-inner-spin-button,
273
- [type="number"]::-webkit-outer-spin-button {
274
- height: auto;
275
- }
276
-
277
- /**
278
- * 1. Correct the odd appearance in Chrome and Safari.
279
- * 2. Correct the outline style in Safari.
280
- */
281
-
282
- [type="search"] {
283
- -webkit-appearance: textfield; /* 1 */
284
- outline-offset: -2px; /* 2 */
285
- }
286
-
287
- /**
288
- * Remove the inner padding in Chrome and Safari on macOS.
289
- */
290
-
291
- [type="search"]::-webkit-search-decoration {
292
- -webkit-appearance: none;
293
- }
294
-
295
- /**
296
- * 1. Correct the inability to style clickable types in iOS and Safari.
297
- * 2. Change font properties to `inherit` in Safari.
298
- */
299
-
300
- ::-webkit-file-upload-button {
301
- -webkit-appearance: button; /* 1 */
302
- font: inherit; /* 2 */
303
- }
304
-
305
- /* Interactive
306
- ========================================================================== */
307
-
308
- /*
309
- * Add the correct display in Edge, IE 10+, and Firefox.
310
- */
311
-
312
- details {
313
- display: block;
314
- }
315
-
316
- /*
317
- * Add the correct display in all browsers.
318
- */
319
-
320
- summary {
321
- display: list-item;
322
- }
323
-
324
- /* Misc
325
- ========================================================================== */
326
-
327
- /**
328
- * Add the correct display in IE 10+.
329
- */
330
-
331
- template {
332
- display: none;
333
- }
334
-
335
- /**
336
- * Add the correct display in IE 10.
337
- */
338
-
339
- [hidden] {
340
- display: none;
341
- }