Skip to content

Commit

Permalink
Fix Sass compilation
Browse files Browse the repository at this point in the history
Sass support was removed from Sinatra 3 due to the `ruby-sass` gem
becoming unmaintained[1]. Support has since been re-added[2], backed
by the modern `sass-embedded` gem, but this hasn't landed in a Sinatra
release yet. Until that happens, let's shim the rendering method.

[1] sinatra/sinatra#1768
[2] sinatra/sinatra#1911
  • Loading branch information
deviant committed Jul 10, 2023
1 parent 039963d commit 78ae5b5
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 472 deletions.
5 changes: 5 additions & 0 deletions lib/irclogger/viewer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ class Viewer < Sinatra::Base
haml :'help/search'
end

def sass(template, options = {}, locals = {})
options.merge! :layout => false, :default_content_type => :css
render :sass, template, options, locals
end

get '/style-dark.css' do
sass :'style-dark'
end
Expand Down
229 changes: 0 additions & 229 deletions public/style-dark.css

This file was deleted.

7 changes: 0 additions & 7 deletions public/style-dark.css.map

This file was deleted.

Loading

0 comments on commit 78ae5b5

Please sign in to comment.