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

119
Views
Pretty Imprimiendo la estructura de SASS Maps anidados?

Si tenemos mapas anidados en SASS (un tema angular, por ejemplo), podemos registrar su contenido con @debug sin embargo, genera todo en una sola línea.

¿Alguien sabe si SASS tiene algo que imprima bastante la estructura de los mapas anidados?

Entonces, por ejemplo, si tuviéramos:

 $colors: ( "primary": ( "milk": #fff, "cola": #000, "mine-shaft": #232323, ), "secondary": ( "pampas": #f4f1ef, "pearl-brush": #e9e2dd, "alto": #ddd, ), );

Podríamos hacer algo como

 @recursive-debug $colors

Registrar la estructura del mismo.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Creé un paquete NPM para esto que es un archivo instalable SASS.

 npm i @fireflysemantics/sass-logger

https://www.npmjs.com/package/@fireflysemantics/sass-logger

Esto es de la sección de uso del LÉAME.

 This demo will create a Angular Material Palette $theme-primary and log the contents by first using the logger to structure the map data containing the result and then outputting that result with @debug. @use '@angular/material' as mat; @use '@fireflysemantics/sass-logger' as logger; // ============================================ // Palettes: https://material.io/design/color/ // ============================================ $theme-primary: mat.define-palette(mat.$indigo-palette); $result: logger.pretty-map($theme-primary); @debug ($result); $theme: mat.define-light-theme($theme-primary, $theme-primary, $theme-primary); //$result: logger.pretty-map($theme);

Esta es una demostración de stackblitz del paquete.

https://stackblitz.com/editar/angular-r9tzuk-ov8kx4

about 4 years ago · Juan Pablo Isaza 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!