browserino 2.13.0 → 2.13.1

Sign up to get free protection for your applications and to get access to all the features.
data/params.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "name": "Browserino",
3
- "tagline": "A ruby browser (dare I say) sniffer",
4
- "body": "# Browserino\r\n\r\nA UserAgent sniffer with Rails >= 3.2.0 integration.\r\nThe sniffer can currently identify 22 bots (of which 6 social media and 5 search engines), 14 browsers, 9 operating systems, 6 programming language UA's and 4 consoles.\r\n\r\n## Status\r\n\r\n[![Gem Version](https://badge.fury.io/rb/browserino.svg)](http://badge.fury.io/rb/browserino)\r\n[![Build Status](https://travis-ci.org/SidOfc/browserino.svg?branch=master)](https://travis-ci.org/SidOfc/browserino)\r\n[![Coverage Status](https://coveralls.io/repos/SidOfc/browserino/badge.svg?branch=master&service=github)](https://coveralls.io/github/SidOfc/browserino?branch=master)\r\n\r\n---\r\n\r\nUseragent references:\r\n\r\n* http://useragentstring.com/\r\n* http://www.zytrax.com/tech/web/mobile_ids.html\r\n* http://www.user-agents.org/\r\n\r\n## Changelog\r\n\r\n_dates are in dd-mm-yyyy format_ \r\n_older changes can be found in the [CHANGELOG.md](CHANGELOG.md)_\r\n\r\n#### 19-10-2016 VERSION 2.10.1.1\r\n\r\n- Test on ruby 2.3.1\r\n- Fix missing questionmarks on method names in the README.\r\n- Change gem homepage to io domain\r\n\r\n#### 25-08-2016 VERSION 2.10.1\r\n\r\n- Replaced `require` with `require_relative` where possible\r\n- Fixed cli not loading due to failing `require`\r\n\r\n#### 24-07-2016 VERSION 2.10.0\r\n\r\n- Added support for the servo browser:\r\n - Added `servo?` method\r\n\r\n- Added detection for various programming languages:\r\n - Added `library?` method\r\n - Added `php?` method\r\n - Added `perl?` method\r\n - Added `python?` method\r\n - Added `java?` method\r\n - Added `curl?` method\r\n - Added `pycurl?` method\r\n\r\n## Installation\r\n\r\nAdd the following to your applications Gemfile:\r\n\r\n```ruby\r\ngem 'browserino'\r\n```\r\n\r\nAnd then execute:\r\n\r\n```\r\n$ bundle\r\n```\r\n\r\nOr install it yourself with:\r\n\r\n```\r\n$ gem install browserino\r\n```\r\n\r\nBrowserino is tested with the following ruby versions\r\n\r\n* 1.9.3\r\n* 2.0.0\r\n* 2.1.0\r\n* 2.2.1\r\n* 2.3.0\r\n* 2.3.1\r\n\r\n## Usage\r\n\r\nAfter installing the gem globally or in your application you'll have to `require` the gem before being able to use it.\r\n\r\n```ruby\r\nrequire 'browserino'\r\n```\r\nAfterwards, the gem is loaded and you can proceed by calling:\r\n\r\n```ruby\r\nBrowserino.parse '<user agent>'\r\n```\r\n\r\nBrowserino is also usable in the command line\r\n\r\n```\r\n~$ browserino parse <ua>\r\n```\r\n\r\nOutput\r\n```\r\nname: chrome, browser_version: 50.0.2661.102, engine_name: webkit, engine_version: 537.36, system_name: macintosh, system_architecture: nil\r\n```\r\n\r\n### Rails (>= 3.2.0)\r\n\r\nIf you're using Rails (>= 3.2.0) you'll have access to an `agent` object. Browserino will initialize itself using the `request.headers['User-Agent']`\r\n\r\n\r\nA quick example on how to get going:\r\n```ruby\r\nclass ApplicationController < ActionController::Base\r\n def some_method\r\n render json: agent\r\n end\r\nend\r\n```\r\n\r\n### General\r\n\r\nthe `parse` method will **always** return a `Browserino::Agent` object.\r\n\r\n```ruby\r\nBrowserino.parse '<user agent>' # => #<Browserino::Agent:0x007f9b09b1fae8 ... >\r\n```\r\n\r\n### Default return values\r\n\r\nIf a property isn't available or not known to Browserino it's return value will always be `nil`, this can be tested by supplying an empty string (`''`) to `parse`:\r\n\r\n```ruby\r\nagent = Browserino.parse ''\r\nagent.name\r\n# => nil\r\n```\r\n\r\nIf a value *is* found then you'll recieve a *lowercase string* containing the information:\r\n\r\n```ruby\r\nagent = Browserino.parse 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/537.36 (KHTML, like Gecko) brave/0.7.7 Chrome/47.0.2526.73 Electron/0.36.2 Safari/537.36'\r\n\r\nagent.name\r\n# => 'brave'\r\n\r\n# or using browser_name\r\n\r\nagent.browser_name\r\n# => 'brave'\r\n\r\nagent.browser_version\r\n# => '0.7.7'\r\n\r\nagent.engine_name\r\n# => 'webkit'\r\n```\r\n\r\nBrowserino also has some question methods, these will always return either `true` or `false`. The exceptions to this rule are methods that can take a name, for instance the `bot?` method:\r\n\r\n```ruby\r\nagent = Browserino.parse ''\r\nagent.bot?\r\n# => true (empty UA's count as anonymous bots)\r\n\r\nagent.googlebot?\r\n# => false\r\n\r\nagent.non_supported_bot?\r\n# => NoMethodError\r\n\r\nagent.bot? :non_supported_bot\r\n# => NoMethodError\r\n```\r\n\r\n### Functions\r\n\r\nThe samples below are all valid calls with their respective outputs, using the `agent` defined below.\r\n\r\n```ruby\r\nagent = Browserino.parse 'Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko'\r\n```\r\n\r\n#### Note\r\n\r\nThe methods `social_media_name`, `search_engine_name`, `bot_name` and `browser_name`\r\nare *all* aliasses of the general `name` method.\r\n\r\nThe exceptions to this rule are `system_name` and `console_name`. They each have their own method.\r\n\r\n##### Quick usage\r\n\r\n```ruby\r\nagent.name\r\n# => 'ie'\r\n\r\n# always returns real version, also when IE is in compat\r\nagent.browser_version\r\n# => '11.0'\r\n\r\n# to get the compat version that IE is running in\r\n# returns real version if not in compat mode\r\nagent.browser_version compat: true\r\n# => '11.0'\r\n\r\nagent.library_name\r\n# => nil\r\n\r\nagent.library_version\r\n# => nil\r\n\r\nagent.engine_name\r\n# => 'trident'\r\n\r\nagent.engine_version\r\n# => '7.0'\r\n\r\nagent.system_name\r\n# => 'windows'\r\n\r\n# system_name attempts to find the operating systems version name\r\n# when full: true is used\r\n# returning an array with either the version name or nil if not found\r\nagent.system_name full: true\r\n# => ['windows', '7']\r\n\r\nagent.system_version\r\n# => '6.1'\r\n\r\nagent.system_architecture\r\n# => 'x64'\r\n\r\nagent.console_name\r\n# => nil\r\n\r\n# two formats possible: 'aa' or `aa-bb`\r\nagent.locale\r\n# => 'as'\r\n```\r\n\r\n##### Question methods\r\n\r\nBrowserino also provides some question methods.\r\n\r\n```ruby\r\n# only for Internet Explorer\r\nagent.compat?\r\n# => false\r\n\r\n# returns true if name is present\r\nagent.known?\r\n# => true\r\n\r\n# returns true if browser is known\r\nagent.browser?\r\n# => true\r\n\r\n# returns true if specific browser\r\nagent.browser? :ie\r\n# => true\r\n\r\n# returns true if specific browser and version\r\nagent.browser? :ie, version: '11.0'\r\n\r\n# returns true if library is known\r\nagent.library?\r\n\r\n# returns true if specific library\r\nagent.library? :php\r\n\r\n# returns true if specific library and version\r\nagent.library? :php, version: '5.9.0'\r\n\r\n# returns true if there is a social media bot on your website\r\nagent.social_media?\r\n# => false\r\n\r\n# returns true if platform is known\r\nagent.platform?\r\n# => true\r\n\r\n# returns true if specific platform\r\nagent.platform? :windows\r\n# => true\r\n\r\n# returns true if specific platform and version\r\nagent.platform? :windows, version: '7'\r\n# => true\r\n\r\n# returns true if console is known\r\nagent.console?\r\n# => false\r\n\r\n# returns true if specific console\r\nagent.console? :xbox\r\n# => false\r\n\r\n# returns true if user agent is empty or a bot is recognized\r\nagent.bot?\r\n# => false\r\n\r\nagent.x64?\r\n# => true\r\n\r\nagent.x32?\r\n# => false\r\n\r\nagent.mobile?\r\n# => false\r\n```\r\n\r\nThe above methods are the base questions you can ask but there are a lot more methods you can call on the `agent`. Every supported browser, operating system or bot is basically a question method so you could do this:\r\n\r\n```ruby\r\nagent.windows?\r\n# => true\r\n\r\n# based on full name\r\nagent.windows? '7'\r\n# => true\r\n\r\n# NT versions also work\r\nagent.windows? 6.1\r\n# => true\r\n```\r\n\r\n##### Transformation\r\n\r\nBrowserino implements `to_a`, `to_h` and `to_s` to allow for collected data to be moved around without attaching the entire object with methods.\r\n\r\n**to_s**\r\n\r\nReturns a compiled string of properties based on available information.\r\n\r\n```ruby\r\nagent.to_s\r\n# => 'ie ie11 trident trident7 windows x64'\r\n\r\n# a seperator can be passed to format the name + version combo's\r\nagent.to_s '-'\r\n# => 'ie ie-11 trident trident-7 windows x64'\r\n```\r\n\r\nIf the agent object can't find a property in the user agent, that property will be excluded from the string.\r\nFor instance, if the `browser_version` and `engine_version` of the `agent` object are `nil` then the following will be returned:\r\n\r\n```ruby\r\nagent.to_s\r\n# => ie trident windows x64\r\n```\r\n\r\n**to_a**\r\n\r\nReturns an array with key => value pairs.\r\n\r\n```ruby\r\nagent.to_a\r\n# => [[:name, \"ie\"],\r\n# [:browser_version, \"11.0\"],\r\n# [:engine_name, \"trident\"],\r\n# [:engine_version, \"7.0\"],\r\n# [:system_name, \"windows\"],\r\n# [:system_version, \"6.1\"],\r\n# [:system_architecture, \"x64\"],\r\n# [:console_name, nil],\r\n# [:locale, \"as\"]]\r\n```\r\n\r\n**to_h**\r\n\r\nReturns a hash with key => value pairs.\r\n\r\n```ruby\r\nagent.to_h\r\n# => {:name=>\"ie\",\r\n# :browser_version=>\"11.0\",\r\n# :engine_name=>\"trident\",\r\n# :engine_version=>\"7.0\",\r\n# :system_name=>\"windows\",\r\n# :system_version=>\"6.1\",\r\n# :system_architecture=>\"x64\",\r\n# :console_name => nil,\r\n# :locale=>\"as\"}\r\n```\r\n\r\n##### Supplying versions\r\n\r\nConsider this parsed string:\r\n\r\n```ruby\r\nagent = Browserino.parse 'Mozilla/5.0 (Linux; U; Android 4.1.2; en-us; SM-T210R Build/JZO54K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30 UCBrowser/2.3.2.300'\r\n\r\n# output for system_name\r\nagent.system_name\r\n# => 'android'\r\n\r\n# output for system_name full: true\r\nagent.system_name full: true\r\n# => ['android', 'Jelly Bean 16']\r\n```\r\n\r\nWhen supplying a version to a method that supports it, you have multiple options for the format of that version.\r\n\r\n* Using a symbol or string without version: `:jelly_bean` or `'jelly_bean'`\r\n* Using a symbol or string with version: `:jelly_bean_16` or `'jelly_bean_16'`\r\n* Using a string: `'4.1.2'` \r\n* Using a float: `4.1`\r\n* Using an int: `4`\r\n\r\nWhen calling the `platform?` or `android?` functions with the above examples, they would all match since the method that compares versions also checks how specific the version is that you want to compare against.\r\n\r\nIf you pass in `4.1` as a version the matcher will look for `x.x` in the extracted version and discard the unspecified value, this allows for you to be explicitly less specific to allow for a greater range of systems to be matched.\r\n\r\n* `4.1.2` will match `4.1.2`\r\n* `4.1` will match `4.1.x`\r\n* `4` will match `4.x.x`\r\n\r\n**Examples using `platform?`**\r\n\r\n```ruby\r\nagent.platform? :android, version: '4.1.2'\r\n# => true\r\n\r\nagent.platform? :android, version: 4.1\r\n# => true\r\n\r\nagent.platform? :android, version: 4\r\n# => true\r\n\r\nagent.platform? :android, version: :jelly_bean\r\n# => true\r\n\r\nagent.platform? :android, version: :jelly_bean_16\r\n# => true\r\n```\r\n\r\n##### `platform?`, `browser?`, `bot?`, `console?`, `search_engine?`, `library` and `social_media?` methods\r\n\r\nAs you've seen above, the `platform?` function can take two arguments, a symbol with the system name and optionally a hash with a `:version` key to supply a version, the `browser?` and `library?` method works in exactly the same way.\r\n\r\nThe `bot?` and `social_media?` methods however aren't that complex since you don't need to know a bot / social media version or anything other than it's name so inside these methods, only a name can be passed:\r\n\r\n*Every social media match is automatically a bot, but a bot isn't automatically social media, __This is also true for the `search_engine?` method__*\r\n\r\n```ruby\r\n# when a bot UA gets parsed\r\nagent = Browserino.parse 'facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)'\r\n\r\nagent.bot?\r\n# => true\r\n\r\nagent.social_media?\r\n# => true\r\n\r\nagent.bot? :facebook\r\n# => true\r\n\r\nagent.social_media? :facebook\r\n# => true\r\n\r\nagent.bot? :facebook, version: 1.1\r\n# => ArgumentError\r\n```\r\n\r\n##### Checking a specific browser, system, bot, library or social media\r\n\r\nEvery name you see in the below lists can be passed as symbol or string to their respective method\r\n\r\n**search engine**\r\n* `google`\r\n* `bing`\r\n* `yahoo_slurp`\r\n* `baiduspider`\r\n* `duckduckgo` or `ddg`\r\n\r\nExamples:\r\n\r\n```ruby\r\nagent.google?\r\nagent.baiduspider?\r\n\r\n# using the search_engine? method\r\nagent.search_engine? :google\r\n\r\n# using shorthand\r\nagent.search_engine? :ddg\r\n```\r\n\r\n**consoles**\r\n\r\n* `xbox`\r\n* `nintendo_ds`\r\n* `wii`\r\n* `playstation`\r\n\r\nExamples:\r\n\r\n```ruby\r\nagent.playstation?\r\nagent.wii?\r\n\r\nagent.console?\r\n\r\nagent.console? :facebook\r\n```\r\n\r\n**social media**\r\n\r\n* `facebook` or `fb`\r\n* `twitter`\r\n* `linkedin`\r\n* `instagram`\r\n* `pinterest`\r\n* `tumblr`\r\n\r\nExamples:\r\n\r\n```ruby\r\nagent.facebook?\r\nagent.tumblr?\r\n\r\n# using the social_media? method\r\nagent.social_media? :facebook\r\n\r\n# using shorthand\r\nagent.social_media? :fb\r\n\r\nagent.social_media? :tumblr\r\n```\r\n\r\n**bot**\r\n\r\n* `google`\r\n* `msn`\r\n* `bing`\r\n* `yahoo_slurp`\r\n* `baiduspider`\r\n* `yandex`\r\n* `sosospider`\r\n* `exa`\r\n* `sogou_spider`\r\n\r\nExamples:\r\n\r\n```ruby\r\nagent.google?\r\nagent.exa?\r\n\r\n# using the bot? method\r\nagent.bot? :google\r\nagent.bot? :exa\r\n```\r\n\r\n**library**\r\n\r\n* `php`\r\n* `perl`\r\n* `curl`\r\n* `python`\r\n* `java`\r\n* `pycurl`\r\n\r\nExamples:\r\n\r\n```ruby\r\nagent.php?\r\nagent.pycurl?\r\n\r\nagent.library?\r\n\r\nagent.library? :curl\r\n\r\nagent.library? :curl, version: 7.21\r\n```\r\n\r\n**browser**\r\n\r\n* `chrome`\r\n* `firefox` or `ff`\r\n* `servo`\r\n* `seamonkey`\r\n* `opera`\r\n* `opera_mini`\r\n* `vivaldi`\r\n* `ucbrowser`\r\n* `maxthon`\r\n* `bolt`\r\n* `brave`\r\n* `safari`\r\n* `ie`\r\n* `edge`\r\n\r\nExamples:\r\n\r\n```ruby\r\nagent.firefox?\r\nagent.chrome? 42\r\n\r\n# using the browser? method\r\nagent.browser? :firefox\r\n\r\n# using shorthand\r\nagent.browser? :ff\r\n\r\nagent.browser? :chrome, version: 42\r\n```\r\n\r\n**operating system**\r\n\r\n* `windows` or `win`\r\n* `macintosh` or `osx`\r\n* `linux`\r\n* `bsd`\r\n* `solaris`\r\n* `android`\r\n* `ios`\r\n* `blackberry` or `bb`\r\n* `windows_phone`\r\n\r\nExamples:\r\n\r\n```ruby\r\nagent.macintosh?\r\nagent.windows_phone? 7\r\n\r\n# to check for windows vista one could do\r\nagent.windows? 6\r\n\r\n# a more readable equivelant\r\nagent.windows? :vista\r\n\r\n# using the platform? method\r\nagent.platform? :macintosh\r\n\r\n# using shorthand\r\nagent.platform? :osx\r\n\r\nagent.platform? :windows_phone, version: 7\r\n```\r\n\r\nNotes:\r\n\r\n* `linux?` doesn't support any versions\r\n* `bsd?` doesn't support any versions\r\n* `solaris?` only supports numeric versions\r\n* *named versions* are only supported if they are present in a [map](https://github.com/SidOfc/browserino/tree/master/lib/browserino/maps)\r\n\r\n## Contributing\r\n\r\nBug reports and pull requests are welcome on GitHub at https://github.com/SidOfc/browserino. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.\r\n\r\n\r\n## License\r\n\r\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\r\n",
5
- "note": "Don't delete this file! It's used internally to help with page regeneration."
6
- }
@@ -1,124 +0,0 @@
1
- /*
2
- The MIT License (MIT)
3
-
4
- Copyright (c) 2016 GitHub, Inc.
5
-
6
- Permission is hereby granted, free of charge, to any person obtaining a copy
7
- of this software and associated documentation files (the "Software"), to deal
8
- in the Software without restriction, including without limitation the rights
9
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- copies of the Software, and to permit persons to whom the Software is
11
- furnished to do so, subject to the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be included in all
14
- copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- SOFTWARE.
23
-
24
- */
25
-
26
- .pl-c /* comment */ {
27
- color: #969896;
28
- }
29
-
30
- .pl-c1 /* constant, variable.other.constant, support, meta.property-name, support.constant, support.variable, meta.module-reference, markup.raw, meta.diff.header */,
31
- .pl-s .pl-v /* string variable */ {
32
- color: #0086b3;
33
- }
34
-
35
- .pl-e /* entity */,
36
- .pl-en /* entity.name */ {
37
- color: #795da3;
38
- }
39
-
40
- .pl-smi /* variable.parameter.function, storage.modifier.package, storage.modifier.import, storage.type.java, variable.other */,
41
- .pl-s .pl-s1 /* string source */ {
42
- color: #333;
43
- }
44
-
45
- .pl-ent /* entity.name.tag */ {
46
- color: #63a35c;
47
- }
48
-
49
- .pl-k /* keyword, storage, storage.type */ {
50
- color: #a71d5d;
51
- }
52
-
53
- .pl-s /* string */,
54
- .pl-pds /* punctuation.definition.string, string.regexp.character-class */,
55
- .pl-s .pl-pse .pl-s1 /* string punctuation.section.embedded source */,
56
- .pl-sr /* string.regexp */,
57
- .pl-sr .pl-cce /* string.regexp constant.character.escape */,
58
- .pl-sr .pl-sre /* string.regexp source.ruby.embedded */,
59
- .pl-sr .pl-sra /* string.regexp string.regexp.arbitrary-repitition */ {
60
- color: #183691;
61
- }
62
-
63
- .pl-v /* variable */ {
64
- color: #ed6a43;
65
- }
66
-
67
- .pl-id /* invalid.deprecated */ {
68
- color: #b52a1d;
69
- }
70
-
71
- .pl-ii /* invalid.illegal */ {
72
- color: #f8f8f8;
73
- background-color: #b52a1d;
74
- }
75
-
76
- .pl-sr .pl-cce /* string.regexp constant.character.escape */ {
77
- font-weight: bold;
78
- color: #63a35c;
79
- }
80
-
81
- .pl-ml /* markup.list */ {
82
- color: #693a17;
83
- }
84
-
85
- .pl-mh /* markup.heading */,
86
- .pl-mh .pl-en /* markup.heading entity.name */,
87
- .pl-ms /* meta.separator */ {
88
- font-weight: bold;
89
- color: #1d3e81;
90
- }
91
-
92
- .pl-mq /* markup.quote */ {
93
- color: #008080;
94
- }
95
-
96
- .pl-mi /* markup.italic */ {
97
- font-style: italic;
98
- color: #333;
99
- }
100
-
101
- .pl-mb /* markup.bold */ {
102
- font-weight: bold;
103
- color: #333;
104
- }
105
-
106
- .pl-md /* markup.deleted, meta.diff.header.from-file */ {
107
- color: #bd2c00;
108
- background-color: #ffecec;
109
- }
110
-
111
- .pl-mi1 /* markup.inserted, meta.diff.header.to-file */ {
112
- color: #55a532;
113
- background-color: #eaffea;
114
- }
115
-
116
- .pl-mdr /* meta.diff.range */ {
117
- font-weight: bold;
118
- color: #795da3;
119
- }
120
-
121
- .pl-mo /* meta.output */ {
122
- color: #1d3e81;
123
- }
124
-
@@ -1,424 +0,0 @@
1
- /*! normalize.css v3.0.2 | MIT License | git.io/normalize */
2
-
3
- /**
4
- * 1. Set default font family to sans-serif.
5
- * 2. Prevent iOS text size adjust after orientation change, without disabling
6
- * user zoom.
7
- */
8
-
9
- html {
10
- font-family: sans-serif; /* 1 */
11
- -ms-text-size-adjust: 100%; /* 2 */
12
- -webkit-text-size-adjust: 100%; /* 2 */
13
- }
14
-
15
- /**
16
- * Remove default margin.
17
- */
18
-
19
- body {
20
- margin: 0;
21
- }
22
-
23
- /* HTML5 display definitions
24
- ========================================================================== */
25
-
26
- /**
27
- * Correct `block` display not defined for any HTML5 element in IE 8/9.
28
- * Correct `block` display not defined for `details` or `summary` in IE 10/11
29
- * and Firefox.
30
- * Correct `block` display not defined for `main` in IE 11.
31
- */
32
-
33
- article,
34
- aside,
35
- details,
36
- figcaption,
37
- figure,
38
- footer,
39
- header,
40
- hgroup,
41
- main,
42
- menu,
43
- nav,
44
- section,
45
- summary {
46
- display: block;
47
- }
48
-
49
- /**
50
- * 1. Correct `inline-block` display not defined in IE 8/9.
51
- * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
52
- */
53
-
54
- audio,
55
- canvas,
56
- progress,
57
- video {
58
- display: inline-block; /* 1 */
59
- vertical-align: baseline; /* 2 */
60
- }
61
-
62
- /**
63
- * Prevent modern browsers from displaying `audio` without controls.
64
- * Remove excess height in iOS 5 devices.
65
- */
66
-
67
- audio:not([controls]) {
68
- display: none;
69
- height: 0;
70
- }
71
-
72
- /**
73
- * Address `[hidden]` styling not present in IE 8/9/10.
74
- * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
75
- */
76
-
77
- [hidden],
78
- template {
79
- display: none;
80
- }
81
-
82
- /* Links
83
- ========================================================================== */
84
-
85
- /**
86
- * Remove the gray background color from active links in IE 10.
87
- */
88
-
89
- a {
90
- background-color: transparent;
91
- }
92
-
93
- /**
94
- * Improve readability when focused and also mouse hovered in all browsers.
95
- */
96
-
97
- a:active,
98
- a:hover {
99
- outline: 0;
100
- }
101
-
102
- /* Text-level semantics
103
- ========================================================================== */
104
-
105
- /**
106
- * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
107
- */
108
-
109
- abbr[title] {
110
- border-bottom: 1px dotted;
111
- }
112
-
113
- /**
114
- * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
115
- */
116
-
117
- b,
118
- strong {
119
- font-weight: bold;
120
- }
121
-
122
- /**
123
- * Address styling not present in Safari and Chrome.
124
- */
125
-
126
- dfn {
127
- font-style: italic;
128
- }
129
-
130
- /**
131
- * Address variable `h1` font-size and margin within `section` and `article`
132
- * contexts in Firefox 4+, Safari, and Chrome.
133
- */
134
-
135
- h1 {
136
- font-size: 2em;
137
- margin: 0.67em 0;
138
- }
139
-
140
- /**
141
- * Address styling not present in IE 8/9.
142
- */
143
-
144
- mark {
145
- background: #ff0;
146
- color: #000;
147
- }
148
-
149
- /**
150
- * Address inconsistent and variable font size in all browsers.
151
- */
152
-
153
- small {
154
- font-size: 80%;
155
- }
156
-
157
- /**
158
- * Prevent `sub` and `sup` affecting `line-height` in all browsers.
159
- */
160
-
161
- sub,
162
- sup {
163
- font-size: 75%;
164
- line-height: 0;
165
- position: relative;
166
- vertical-align: baseline;
167
- }
168
-
169
- sup {
170
- top: -0.5em;
171
- }
172
-
173
- sub {
174
- bottom: -0.25em;
175
- }
176
-
177
- /* Embedded content
178
- ========================================================================== */
179
-
180
- /**
181
- * Remove border when inside `a` element in IE 8/9/10.
182
- */
183
-
184
- img {
185
- border: 0;
186
- }
187
-
188
- /**
189
- * Correct overflow not hidden in IE 9/10/11.
190
- */
191
-
192
- svg:not(:root) {
193
- overflow: hidden;
194
- }
195
-
196
- /* Grouping content
197
- ========================================================================== */
198
-
199
- /**
200
- * Address margin not present in IE 8/9 and Safari.
201
- */
202
-
203
- figure {
204
- margin: 1em 40px;
205
- }
206
-
207
- /**
208
- * Address differences between Firefox and other browsers.
209
- */
210
-
211
- hr {
212
- box-sizing: content-box;
213
- height: 0;
214
- }
215
-
216
- /**
217
- * Contain overflow in all browsers.
218
- */
219
-
220
- pre {
221
- overflow: auto;
222
- }
223
-
224
- /**
225
- * Address odd `em`-unit font size rendering in all browsers.
226
- */
227
-
228
- code,
229
- kbd,
230
- pre,
231
- samp {
232
- font-family: monospace, monospace;
233
- font-size: 1em;
234
- }
235
-
236
- /* Forms
237
- ========================================================================== */
238
-
239
- /**
240
- * Known limitation: by default, Chrome and Safari on OS X allow very limited
241
- * styling of `select`, unless a `border` property is set.
242
- */
243
-
244
- /**
245
- * 1. Correct color not being inherited.
246
- * Known issue: affects color of disabled elements.
247
- * 2. Correct font properties not being inherited.
248
- * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
249
- */
250
-
251
- button,
252
- input,
253
- optgroup,
254
- select,
255
- textarea {
256
- color: inherit; /* 1 */
257
- font: inherit; /* 2 */
258
- margin: 0; /* 3 */
259
- }
260
-
261
- /**
262
- * Address `overflow` set to `hidden` in IE 8/9/10/11.
263
- */
264
-
265
- button {
266
- overflow: visible;
267
- }
268
-
269
- /**
270
- * Address inconsistent `text-transform` inheritance for `button` and `select`.
271
- * All other form control elements do not inherit `text-transform` values.
272
- * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
273
- * Correct `select` style inheritance in Firefox.
274
- */
275
-
276
- button,
277
- select {
278
- text-transform: none;
279
- }
280
-
281
- /**
282
- * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
283
- * and `video` controls.
284
- * 2. Correct inability to style clickable `input` types in iOS.
285
- * 3. Improve usability and consistency of cursor style between image-type
286
- * `input` and others.
287
- */
288
-
289
- button,
290
- html input[type="button"], /* 1 */
291
- input[type="reset"],
292
- input[type="submit"] {
293
- -webkit-appearance: button; /* 2 */
294
- cursor: pointer; /* 3 */
295
- }
296
-
297
- /**
298
- * Re-set default cursor for disabled elements.
299
- */
300
-
301
- button[disabled],
302
- html input[disabled] {
303
- cursor: default;
304
- }
305
-
306
- /**
307
- * Remove inner padding and border in Firefox 4+.
308
- */
309
-
310
- button::-moz-focus-inner,
311
- input::-moz-focus-inner {
312
- border: 0;
313
- padding: 0;
314
- }
315
-
316
- /**
317
- * Address Firefox 4+ setting `line-height` on `input` using `!important` in
318
- * the UA stylesheet.
319
- */
320
-
321
- input {
322
- line-height: normal;
323
- }
324
-
325
- /**
326
- * It's recommended that you don't attempt to style these elements.
327
- * Firefox's implementation doesn't respect box-sizing, padding, or width.
328
- *
329
- * 1. Address box sizing set to `content-box` in IE 8/9/10.
330
- * 2. Remove excess padding in IE 8/9/10.
331
- */
332
-
333
- input[type="checkbox"],
334
- input[type="radio"] {
335
- box-sizing: border-box; /* 1 */
336
- padding: 0; /* 2 */
337
- }
338
-
339
- /**
340
- * Fix the cursor style for Chrome's increment/decrement buttons. For certain
341
- * `font-size` values of the `input`, it causes the cursor style of the
342
- * decrement button to change from `default` to `text`.
343
- */
344
-
345
- input[type="number"]::-webkit-inner-spin-button,
346
- input[type="number"]::-webkit-outer-spin-button {
347
- height: auto;
348
- }
349
-
350
- /**
351
- * 1. Address `appearance` set to `searchfield` in Safari and Chrome.
352
- * 2. Address `box-sizing` set to `border-box` in Safari and Chrome
353
- * (include `-moz` to future-proof).
354
- */
355
-
356
- input[type="search"] {
357
- -webkit-appearance: textfield; /* 1 */ /* 2 */
358
- box-sizing: content-box;
359
- }
360
-
361
- /**
362
- * Remove inner padding and search cancel button in Safari and Chrome on OS X.
363
- * Safari (but not Chrome) clips the cancel button when the search input has
364
- * padding (and `textfield` appearance).
365
- */
366
-
367
- input[type="search"]::-webkit-search-cancel-button,
368
- input[type="search"]::-webkit-search-decoration {
369
- -webkit-appearance: none;
370
- }
371
-
372
- /**
373
- * Define consistent border, margin, and padding.
374
- */
375
-
376
- fieldset {
377
- border: 1px solid #c0c0c0;
378
- margin: 0 2px;
379
- padding: 0.35em 0.625em 0.75em;
380
- }
381
-
382
- /**
383
- * 1. Correct `color` not being inherited in IE 8/9/10/11.
384
- * 2. Remove padding so people aren't caught out if they zero out fieldsets.
385
- */
386
-
387
- legend {
388
- border: 0; /* 1 */
389
- padding: 0; /* 2 */
390
- }
391
-
392
- /**
393
- * Remove default vertical scrollbar in IE 8/9/10/11.
394
- */
395
-
396
- textarea {
397
- overflow: auto;
398
- }
399
-
400
- /**
401
- * Don't inherit the `font-weight` (applied by a rule above).
402
- * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
403
- */
404
-
405
- optgroup {
406
- font-weight: bold;
407
- }
408
-
409
- /* Tables
410
- ========================================================================== */
411
-
412
- /**
413
- * Remove most spacing between table cells.
414
- */
415
-
416
- table {
417
- border-collapse: collapse;
418
- border-spacing: 0;
419
- }
420
-
421
- td,
422
- th {
423
- padding: 0;
424
- }