Unified · Split
| @@ -24,6 +24,8 @@ · 23 unmodified lines | ||
| 24 | 24 | > h3 { @extend %block-label, %label-blue; } |
| 25 | 25 | > h4 { font-size: 1em; } |
| 26 | 26 | |
| 27 | + p > code { @extend %label; } | |
| 28 | + | |
| 27 | 29 | > .note, |
| 28 | 30 | .notice, |
| 29 | 31 | .warning, |
| @@ -293,6 +293,8 @@ class App < Sinatra::Application · 292 unmodified lines | ||
| 293 | 293 | '/css-data-types/' => '/css-values-units/', |
| 294 | 294 | '/css-at-rules/' => '/?q=css%20%40', |
| 295 | 295 | '/html/article' => '/html/element/article', |
| 296 | + 'html-html5/' => 'html-elements/', | |
| 297 | + 'html-standard/' => 'html-elements/', | |
| 296 | 298 | '/http-status-codes/' => '/http-status/' |
| 297 | 299 | }.each do |path, url| |
| 298 | 300 | class_eval <<-CODE, __FILE__, __LINE__ + 1 |
| @@ -6,17 +6,17 @@ module Docs · 5 unmodified lines | ||
| 6 | 6 | 'CSS_Background_and_Borders' => 'Backgrounds & Borders', |
| 7 | 7 | 'CSS_Columns' => 'Multi-column Layout', |
| 8 | 8 | 'CSS_Flexible_Box_Layout' => 'Flexible Box Layout', |
| 9 | + 'CSS_Grid_Layout' => 'Grid Layout', | |
| 9 | 10 | 'CSS_Images' => 'Image Values', |
| 10 | 11 | 'CSS_Lists_and_Counters' => 'Lists & Counters', |
| 11 | 12 | 'CSS_Transforms' => 'Transforms', |
| 12 | 13 | 'Media_Queries' => 'Media Queries', |
| 13 | − '@media' => 'Media Queries', | |
| 14 | 14 | 'transform-function' => 'Transforms', |
| 15 | + '@media' => 'Media Queries', | |
| 15 | 16 | 'text-size-adjust' => 'Miscellaneous', |
| 16 | 17 | 'resolved_value' => 'Miscellaneous', |
| 17 | 18 | 'touch-action' => 'Miscellaneous', |
| 18 | − 'will-change' => 'Miscellaneous', | |
| 19 | − 'align-self' => 'Flexible Box Layout' | |
| 19 | + 'will-change' => 'Miscellaneous' | |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | DATA_TYPE_SLUGS = %w(angle basic-shape color_value counter frequency |
| @@ -53,6 +53,7 @@ module Docs · 30 unmodified lines | ||
| 53 | 53 | type.remove! %r{\(.*\)} |
| 54 | 54 | type.sub! 'and', '&' |
| 55 | 55 | type.strip! |
| 56 | + type = 'Grid Layout' if type.include?('Grid Layout') | |
| 56 | 57 | type = 'Scroll Snap' if type.include?('Scroll Snap') |
| 57 | 58 | type = 'Compositing & Blending' if type.include?('Compositing') |
| 58 | 59 | type = 'Animations & Transitions' if type.in?(%w(Animations Transitions)) |
| @@ -118,7 +119,7 @@ module Docs · 59 unmodified lines | ||
| 118 | 119 | %w(step-end step-end) ], |
| 119 | 120 | 'color_value' => [ |
| 120 | 121 | %w(transparent transparent_keyword), |
| 121 | − %w(currentColor currentColor_keyword), | |
| 122 | + %w(currentColor currentcolor_keyword), | |
| 122 | 123 | %w(rgb() rgb), |
| 123 | 124 | %w(hsl() hsl), |
| 124 | 125 | %w(rgba() rgba), |
| @@ -10,9 +10,15 @@ module Docs · 9 unmodified lines | ||
| 10 | 10 | end |
| 11 | 11 | |
| 12 | 12 | def other |
| 13 | + css('h1 + br').remove | |
| 14 | + | |
| 13 | 15 | # Bug fix: HTMLElement.offsetWidth |
| 14 | 16 | css('#offsetContainer .comment').remove |
| 15 | 17 | |
| 18 | + css('section', 'font').each do |node| | |
| 19 | + node.before(node.children).remove | |
| 20 | + end | |
| 21 | + | |
| 16 | 22 | # Bug fix: CompositionEvent, DataTransfer, etc. |
| 17 | 23 | if (div = at_css('div[style]')) && div['style'].include?('border: solid #ddd 2px') |
| 18 | 24 | div.remove |
| @@ -24,6 +24,7 @@ module Docs · 23 unmodified lines | ||
| 24 | 24 | 'High Resolution Time' => 'Web Performance', |
| 25 | 25 | 'Intersection' => 'Intersection Observer', |
| 26 | 26 | 'Media Capture' => 'Media', |
| 27 | + 'Media Session' => 'Media Session', | |
| 27 | 28 | 'Media Source' => 'Media', |
| 28 | 29 | 'MediaStream' => 'Media Streams', |
| 29 | 30 | 'Navigation Timing' => 'Web Performance', |
| @@ -69,6 +70,7 @@ module Docs · 39 unmodified lines | ||
| 69 | 70 | 'element' => 'Element', |
| 70 | 71 | 'event' => 'Event', |
| 71 | 72 | 'Event' => 'Event', |
| 73 | + 'EventSource' => 'Server-Sent Events', | |
| 72 | 74 | 'Fetch' => 'Fetch', |
| 73 | 75 | 'File' => 'File', |
| 74 | 76 | 'GlobalEventHandlers' => 'GlobalEventHandlers', |
| @@ -78,7 +80,8 @@ module Docs · 3 unmodified lines | ||
| 78 | 80 | 'IDB' => 'IndexedDB', |
| 79 | 81 | 'location' => 'Location', |
| 80 | 82 | 'navigator' => 'Navigator', |
| 81 | − 'MediaQuery' => 'MediaQuery', | |
| 83 | + 'MediaMetadata' => 'Media Session', | |
| 84 | + 'MediaSession' => 'Media Session', | |
| 82 | 85 | 'MediaTrack' => 'Media Streams', |
| 83 | 86 | 'Node' => 'Node', |
| 84 | 87 | 'Notification' => 'Notification', |
| @@ -92,10 +95,12 @@ module Docs · 7 unmodified lines | ||
| 92 | 95 | 'RTC' => 'WebRTC', |
| 93 | 96 | 'screen' => 'Screen', |
| 94 | 97 | 'Selection' => 'Selection', |
| 98 | + 'Shadow' => 'Shadow DOM', | |
| 95 | 99 | 'Storage' => 'Web Storage', |
| 96 | 100 | 'StyleSheet' => 'CSS', |
| 97 | 101 | 'Stylesheet' => 'CSS', |
| 98 | 102 | 'SVG' => 'SVG', |
| 103 | + 'TimeRanges' => 'Media', | |
| 99 | 104 | 'timing' => 'Web Performance', |
| 100 | 105 | 'Timing' => 'Web Performance', |
| 101 | 106 | 'Touch' => 'Touch Events', |
| @@ -2,16 +2,8 @@ module Docs · 1 unmodified line | ||
| 2 | 2 | class Html |
| 3 | 3 | class CleanHtmlFilter < Filter |
| 4 | 4 | def call |
| 5 | − css('span > .icon-thumbs-down-alt:first-child:last-child').each do |node| | |
| 6 | − node.parent.replace('deprecated') | |
| 7 | − end | |
| 8 | − | |
| 9 | − css('span > .icon-trash:first-child:last-child').each do |node| | |
| 10 | − node.parent.replace('deleted') | |
| 11 | − end | |
| 12 | − | |
| 13 | − css('span > .icon-warning-sign:first-child:last-child').each do |node| | |
| 14 | − node.parent.replace('non standard') | |
| 5 | + css('section', 'div.section', 'div.row').each do |node| | |
| 6 | + node.before(node.children).remove | |
| 15 | 7 | end |
| 16 | 8 | |
| 17 | 9 | doc |
| @@ -1,7 +1,6 @@ | ||
| 1 | 1 | module Docs |
| 2 | 2 | class Html |
| 3 | 3 | class EntriesFilter < Docs::EntriesFilter |
| 4 | − HTML5 = %w(content element video) | |
| 5 | 4 | OBSOLETE = %w(frame frameset hgroup noframes) |
| 6 | 5 | ADDITIONAL_ENTRIES = { 'Element/Heading_Elements' => (1..6).map { |n| ["h#{n}"] } } |
| 7 | 6 | |
| @@ -14,23 +13,16 @@ module Docs · 6 unmodified lines | ||
| 14 | 13 | end |
| 15 | 14 | |
| 16 | 15 | def get_type |
| 17 | − slug = self.slug.remove('Element/') | |
| 16 | + return 'Miscellaneous' if slug.include?('CORS') || slug.include?('Using') | |
| 18 | 17 | |
| 19 | − if self.slug.start_with?('Global_attr') | |
| 18 | + if slug.start_with?('Global_attr') | |
| 20 | 19 | 'Attributes' |
| 21 | − elsif at_css('.obsoleteHeader', '.deprecatedHeader', '.nonStandardHeader') || OBSOLETE.include?(slug) | |
| 20 | + elsif at_css('.obsoleteHeader', '.deprecatedHeader', '.nonStandardHeader') || OBSOLETE.include?(slug.remove('Element/')) | |
| 22 | 21 | 'Obsolete' |
| 22 | + elsif slug.start_with?('Element/') | |
| 23 | + 'Elements' | |
| 23 | 24 | else |
| 24 | − spec = css('.standard-table').last.try(:content) | |
| 25 | − if (spec && html5_spec?(spec)) || HTML5.include?(slug) | |
| 26 | − 'HTML5' | |
| 27 | − else | |
| 28 | − if self.slug.start_with?('Element/') | |
| 29 | − 'Standard' | |
| 30 | − else | |
| 31 | − 'Miscellaneous' | |
| 32 | − end | |
| 33 | − end | |
| 25 | + 'Miscellaneous' | |
| 34 | 26 | end |
| 35 | 27 | end |
| 36 | 28 | |
| @@ -60,10 +52,6 @@ module Docs · 23 unmodified lines | ||
| 60 | 52 | [] |
| 61 | 53 | end |
| 62 | 54 | end |
| 63 | − | |
| 64 | − def html5_spec?(spec) | |
| 65 | − (spec =~ /HTML\s?5/ || spec.include?('WHATWG HTML Living Standard')) && spec !~ /HTML\s?4/ | |
| 66 | − end | |
| 67 | 55 | end |
| 68 | 56 | end |
| 69 | 57 | end |
| @@ -19,7 +19,9 @@ module Docs · 18 unmodified lines | ||
| 19 | 19 | '/symbols' => '/@counter-style/symbols', |
| 20 | 20 | '/system' => '/@counter-style/system', |
| 21 | 21 | '/var' => '/var()', |
| 22 | − '/Flexbox' => '/CSS_Flexible_Box_Layout/Using_CSS_flexible_boxes' | |
| 22 | + '/element' => '/element()', | |
| 23 | + '/Flexbox' => '/CSS_Flexible_Box_Layout/Using_CSS_flexible_boxes', | |
| 24 | + '/currentColor' => '/color_value' | |
| 23 | 25 | } |
| 24 | 26 | |
| 25 | 27 | options[:fix_urls] = ->(url) do |
| @@ -8,6 +8,8 @@ module Docs · 7 unmodified lines | ||
| 8 | 8 | |
| 9 | 9 | html_filters.push 'xslt_xpath/clean_html', 'xslt_xpath/entries', 'title' |
| 10 | 10 | |
| 11 | + options[:root_title] = 'XSLT' | |
| 12 | + | |
| 11 | 13 | options[:only_patterns] = [/\A\/XSLT/, /\A\/XPath/] |
| 12 | 14 | |
| 13 | 15 | options[:fix_urls] = ->(url) do |