Unified · Split
| @@ -1,9 +1,9 @@ | |||
| 1 | module Docs | 1 | module Docs |
| 2 | class Css | 2 | class Css |
| 3 | class EntriesFilter < Docs::EntriesFilter | 3 | class EntriesFilter < Docs::EntriesFilter |
| 4 | DATA_TYPE_SLUGS = %w(angle color_value counter frequency gradient image | 4 | DATA_TYPE_SLUGS = %w(angle basic-shape color_value counter frequency |
| 5 | integer length number percentage position_value ratio resolution shape | 5 | gradient image integer length number percentage position_value ratio |
| 6 | string time timing-function uri user-ident) | 6 | resolution shape string time timing-function uri user-ident) |
| 7 | 7 | ||
| 8 | FUNCTION_SLUGS = %w(attr calc cross-fade cubic-bezier cycle element | 8 | FUNCTION_SLUGS = %w(attr calc cross-fade cubic-bezier cycle element |
| 9 | linear-gradient radial-gradient repeating-linear-gradient | 9 | linear-gradient radial-gradient repeating-linear-gradient |
| @@ -12,7 +12,7 @@ module Docs · 2 unmodified lines | |||
| 12 | PSEUDO_ELEMENT_SLUGS = %w(::after ::before ::first-letter ::first-line | 12 | PSEUDO_ELEMENT_SLUGS = %w(::after ::before ::first-letter ::first-line |
| 13 | ::selection) | 13 | ::selection) |
| 14 | 14 | ||
| 15 | VALUE_SLUGS = %w(auto inherit initial none normal) | 15 | VALUE_SLUGS = %w(auto inherit initial none normal unset) |
| 16 | 16 | ||
| 17 | ADDITIONAL_ENTRIES = { | 17 | ADDITIONAL_ENTRIES = { |
| 18 | 'shape' => [ | 18 | 'shape' => [ |
| @@ -8,7 +8,6 @@ module Docs · 7 unmodified lines | |||
| 8 | 8 | ||
| 9 | options[:root_title] = 'CSS' | 9 | options[:root_title] = 'CSS' |
| 10 | 10 | ||
| 11 | # Don't want | ||
| 12 | options[:skip] = %w( | 11 | options[:skip] = %w( |
| 13 | /Syntax | 12 | /Syntax |
| 14 | /At-rule | 13 | /At-rule |
| @@ -32,12 +31,15 @@ module Docs · 17 unmodified lines | |||
| 32 | /Pseudo-classes | 31 | /Pseudo-classes |
| 33 | /CSS_values_syntax | 32 | /CSS_values_syntax |
| 34 | /Media/Visual | 33 | /Media/Visual |
| 35 | /block_formatting_context) | 34 | /block_formatting_context |
| 35 | /image() | ||
| 36 | /paged_media) | ||
| 36 | 37 | ||
| 37 | options[:skip_patterns] = [/\-webkit/, /\-moz/, /Extensions/, /Tools/] | 38 | options[:skip_patterns] = [/\-webkit/, /\-moz/, /Extensions/, /Tools/] |
| 38 | 39 | ||
| 39 | # Broken / Empty | 40 | options[:replace_paths] = { |
| 40 | options[:skip].concat %w(/image()) | 41 | '/%3Cbasic-shape%3E' => '/basic-shape' |
| 42 | } | ||
| 41 | 43 | ||
| 42 | options[:fix_urls] = ->(url) do | 44 | options[:fix_urls] = ->(url) do |
| 43 | url.sub! %r{https://developer\.mozilla\.org/en\-US/docs/CSS/([a-z@:])}, "#{Css.base_url}/\\1" | 45 | url.sub! %r{https://developer\.mozilla\.org/en\-US/docs/CSS/([a-z@:])}, "#{Css.base_url}/\\1" |