Linking to CSS from layouts using Padrino, Sass, and Slim
Question
I'm currently using Padrino with Sass and Slim to markup a site that I'm making; however, I'm having trouble linking my CSS (converted from the Sass). My application.slim layout is as follows:
doctype html
html
head
title "test"
= stylesheet_link_tag "clear"
script src="/javascripts/dojo.js" data-dojo-config="async: true"
body
div.header
p.title Hello World
p.subtitle Subtext Here
div.content
== yield
div.footer
p.copywrite This is a footer.
the view for the page I'm testing on is blank, and renders to the following text:
<link href="/stylesheets/clear.css?1342971760" media="screen" rel="stylesheet" type="text/css" />
Hello World
Subtext Here
This is a footer.
The link to "/stylesheets/clear.css" points to the correct place as far as I can tell, but the tag is being added to the body, instead of the header in which the call is located. In addition, the entire tag is in quotes in the rendered HTML.
Does anyone know what I'm doing wrong?
Solution
I ended up doing link href='/stylesheets/clear.css' rel='stylesheet' type='text/css'
, and it seems to work now. I still wish I knew how to make the other method work, but this will do.