Skip to content
Browse files

Split H5BP Style sheet into two so that user styles are properly wrap…

…ped by the h5bp styles.
  • Loading branch information...
1 parent 5c893cc commit 93219ce8120612f67d0d14586070286c1cc555e8 @russfrisch committed Sep 3, 2011
Showing with 9 additions and 3 deletions.
  1. +9 −3 h5bp.rb
View
12 h5bp.rb
@@ -8,20 +8,26 @@
# Download and merge HTML5 Boilerplate stylesheet with application.css
inside('app/assets/stylesheets/') do
FileUtils.rm_rf 'application.css'
+ FileUtils.touch 'application.css'
end
-get "https://github.com/paulirish/html5-boilerplate/raw/master/css/style.css", "app/assets/stylesheets/application.css"
prepend_to_file 'app/assets/stylesheets/application.css' do
" /*
* This is a manifest file that'll automatically include all the stylesheets available in this directory
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
* the top of the compiled file, but it's generally better to create a new file per style scope.
+ *= require application-pre
*= require_self
- *= require_tree .
+ *= require application-post
*/
"
end
-gsub_file 'app/assets/stylesheets/application.css', /==\|==/, '==|==.'
+get "https://github.com/paulirish/html5-boilerplate/raw/master/css/style.css", "app/assets/stylesheets/application-pre.css"
+get "https://github.com/paulirish/html5-boilerplate/raw/master/css/style.css", "app/assets/stylesheets/application-post.css"
+gsub_file 'app/assets/stylesheets/application-pre.css', /\/\* ==\|== media queries.* /m, ''
+gsub_file 'app/assets/stylesheets/application-post.css', /\A.*?(==\|== primary styles).*?(\*\/){1}/m, ''
+gsub_file 'app/assets/stylesheets/application-pre.css', /==\|==/, '==|==.'
+gsub_file 'app/assets/stylesheets/application-post.css', /==\|==/, '==|==.'
# Download HTML5 Boilerplate site root assets
get "https://github.com/russfrisch/html5-boilerplate/raw/master/apple-touch-icon-114x114-precomposed.png", "public/apple-touch-icon-114x114-precomposed.png"

1 comment on commit 93219ce

@SathishRaju

https://github.com/paulirish/html5-boilerplate/raw/master/css/style.css cannot be found. Getting 404 error while applying the template.

Please sign in to comment.
Something went wrong with that request. Please try again.