Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SLIM add space at start of multi line

I am trying to add a space to the start of my slim template where I have had to break the text due to a link, I cant for the life of me work this one out

.mdl-cell.mdl-cell--4-col-phone.mdl-cell--8-col-tablet.mdl-cell--12-col-desktop
  | Don't have an account?
  = link_to 'Create one here.', sign_up_path
like image 444
Boss Nass Avatar asked Aug 14 '16 09:08

Boss Nass


3 Answers

found after some deeper research that the slim way is to use > so the new code is, which forced whitespace at the end of the first line

span> Don't have an account? 
= link_to 'Create one here.', sign_up_path
like image 117
Boss Nass Avatar answered Nov 03 '22 00:11

Boss Nass


with a simple quote ' the slim add a space

.mdl-cell.mdl-cell--4-col-phone.mdl-cell--8-col-tablet.mdl-cell--12-col-desktop
  | Don't have an account?
  '
  = link_to 'Create one here.', sign_up_path
like image 45
Breno Perucchi Avatar answered Nov 03 '22 00:11

Breno Perucchi


You can use   to add space between html elements:

.mdl-cell.mdl-cell--4-col-phone.mdl-cell--8-col-tablet.mdl-cell--12-col-desktop
| Don't have an account? 
= link_to 'Create one here.', sign_up_path
like image 40
Michał Zalewski Avatar answered Nov 02 '22 23:11

Michał Zalewski