Skip to content

Commit

Permalink
Update Sass documentation (1.82.9)
Browse files Browse the repository at this point in the history
  • Loading branch information
simon04 committed Dec 8, 2024
1 parent 9bdd8f6 commit 7f33327
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 12 deletions.
17 changes: 16 additions & 1 deletion assets/stylesheets/pages/_yard.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
._yard {
@extend %simple;

.tag_title { font-weight: var(--boldFontWeight); }
.tag_title {
font-weight: var(--boldFontWeight);
}

.sl-c-description-list--horizontal * {
display: inline-block;
padding: 0;
margin: 0;
dt {
margin-left: 1rem;
}
}

.sl-c-callout--warning {
@extend %note, %note-orange;
}
}
18 changes: 11 additions & 7 deletions lib/docs/filters/sass/clean_html.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ def call
@doc = at_css('#main-content .typedoc', '#main-content')

css('.sl-c-alert').remove

css('.sl-l-medium-holy-grail__navigation').remove

css('.sl-r-banner').remove

css('.site-footer').remove

css('.tsd-breadcrumb').remove
css('.sl-c-callout--warning > h3').remove
css('.ui-tabs-nav').remove
css('.sl-c-to-playground').remove

# Add id to code blocks
css('pre.signature').each do |node|
Expand Down Expand Up @@ -42,14 +41,19 @@ def call
css('.visuallyhidden').remove

### Syntax Highlight ###
css('.highlight.scss', '.highlight.sass').each do |node|
css('.language-scss').each do |node|
node['data-language'] = 'scss'
node.content = node.content.strip
end

css('.highlight.css').each do |node|
css('.language-sass').each do |node|
node['data-language'] = 'sass'
node.content = "// SASS\n#{node.content.strip}"
end

css('.language-css').each do |node|
node['data-language'] = 'css'
node.content = node.content.strip
node.content = "/* CSS */\n#{node.content.strip}"
end

doc
Expand Down
12 changes: 8 additions & 4 deletions lib/docs/scrapers/sass.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Docs
class Sass < UrlScraper
self.type = 'yard'
self.release = '1.56.1'
self.release = '1.82.9'
self.base_url = 'https://sass-lang.com/documentation'
self.root_path = 'index.html'
self.links = {
Expand All @@ -14,17 +14,21 @@ class Sass < UrlScraper
options[:root_title] = false

options[:skip_patterns] = [/breaking-changes/]

# options[:container] = '#main-content'
options[:trailing_slash] = false

options[:attribution] = <<-HTML
&copy; 2006&ndash;2022 the Sass team, and numerous contributors<br>
&copy; 2006&ndash;2024 the Sass team, and numerous contributors<br>
Licensed under the MIT License.
HTML

private

def get_latest_version(opts)
get_npm_version('sass', opts)
end

def parse(response)
response.body.gsub! '<span class="widont">&nbsp;</span>', '&nbsp;'
end
end
end

0 comments on commit 7f33327

Please sign in to comment.