Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

300
Views
Evaluar el código ruby dentro de html: filtro css

Quiero agregar un estilo css que calculo en mi código ruby dentro de una plantilla haml .

Entiendo que debo usar el filtro :css para agregar una etiqueta de style para mi css como esta:

 %head - my_color = "#0000ff" :css .my-class { / how can I set my_color here: background-color: red; }

Pero, ¿cómo puedo usar my_color dentro del filtro?

Editar: para ser claros, estoy buscando una etiqueta <style> , no CSS en línea en un elemento.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Puede interpolar la variable con #{my_color} :

 - my_color = "#0000ff" :css .my-class { background-color: #{my_color}; }
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!