Nice to meet you.
Prototyping with Slim+sass+middleman.
Does anyone know how to refer to the variables defined in Slim in SAS SCSS when describing SAS SCSS in a Slim file?
H I remember doing the same thing with Haml…
As an example, I would like to do the following:
Thank you for your cooperation.
Define variables in //slim
- height = 177.0
- width = Time.now.min
.rectangle
sass:
.rectangle
Invoke variables with //ass
height —$height
width —$width
sass
slim-lang
I don't think I can.
Isn't there no choice but to finish with a slim?
[slim]
-height=177.0
- width = Time.now.min
.rectangle style="height:#{height};width:#{width};"
Or using jQuery
[slim+jQuery]
-height=177.0
- width = Time.now.min
.rectangle
javascript:
$(document).ready(function(){$('.rectangle').css({'height':#{height},'width':#{width}});});
However, for middleman in the above example, width is the value at the time of build, so it does not change dynamically, and I have doubts about the time.now.min using slim.If you want to change the width value dynamically depending on the time, isn't it necessary to calculate the width value in JavaScript?
548 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
546 Understanding How to Configure Google API Key
547 Who developed the "avformat-59.dll" that comes with FFmpeg?
709 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
537 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2024 OneMinuteCode. All rights reserved.