Friday, 15 April 2011

node.js - Change Font and Color in Jade -



node.js - Change Font and Color in Jade -

i'm new @ jade , i'm wondering how alter font , color of texts? if have layout.jade i'm using extend helloworld.jade , userlist.jade; , want alter font , color of userlist.jade. i'm wondering syntax be.

extends layout style h1{font-size: 19px; color: #464646;} block content h1= title p welcome #{title}

however i'm getting errors

"invalid indentation, can utilize tabs or spaces not both"

also i'm using node.js run server. thanks.

you need include trailing dot after style in order create jade parser ignore indented under style tag. in illustration it's trying read h1 tag nested within style tag, rather plain text interpreted css rules browser.

extends layout style. h1 { font-size: 19px; color: #464646; } block content h1= title p welcome #{title}

working example.

remove dot after style in codepen , you'll see jade parser yells @ , says can't interpret h1 tag you're trying nest within style tag.

ps - had differing indentation sizes. indentation needs either tabs, or spaces (same number of spaces). jade doesn't allow mix , match indentation styles since depends on indentation compile html.

node.js jade

No comments:

Post a Comment