DEV Community

FSCSS tutorials for FSCSS tutorials

Posted on • Edited on • Originally published at ln.run

Assigning one value to multiple properties FSCSS

Here is some FSCSS method that can assign one value to multiple properties in CSS.
Example:
The %2 method in FSCSS (Figured Shorthand Cascading Style Sheet) is used to assign the same value to two properties in a concise way. Instead of writing each property separately, you can group them together and provide the value once.

  • $M(up to 18 properties separated with comma [:value;])
  • $P(up to 10 properties separated with comma [value auto enclose with colon and semicolon]) Example : $p(max-height, max-width[500px])
  • %I( up to 10 properties separated with comma [:value;]) Example 1: %i(width, height[:480px;]) Example 2: %i(transform: rotateY, transform: skewX[(90deg);])
  • %9(up to 9 properties[:value;])
  • %8(up to 8 properties[:value;])
  • %7(up to 7 properties[:value;])
  • %6(up to 6 properties[:value;])
  • %5(up to 5 properties[:value;])
  • %4(up to 4 properties[:value;])
  • %3(up to 3 properties[:value;])
  • %2(up to 2 properties[:value;])
  • %1(1 property[:value;])

RGB color with %3()
rgb(%3([100,])1)
The method shared the value in 3 places.
CSS: rgb(100,100,100,1)
More examples:
FSCSS: rgb(%2(200[,200]))
CSS: rgb(200,200,200)

HSL color with %2()
hsl(200%2([,50%]))
The method shared the value in 2 places.
CSS: hsl(200,50%,50%)
More examples:
FSCSS: hsla(500%2([,25%]))
CSS : hsla(500,25%,25%)

Hexadecimal color with FSCSS

FSCSS: #%6([0])
CSS: #000000
FSCSS: #%3(F,D,8[0])
CSS: #F0D080

With 200px height 200px in FSCSS
FSCSS: %2(WIDTH, HEIGHT[:200PX;])
The %2 means that the parameter will not contain more than 2 properties,
The WIDTH is the first property and the HEIGHT is the second property,
And the value for both of them is enclosed in the square brackets.

CSS: width: 200px; height: 200px;

<haed>
<script src='https://wbf.tiiny.site/scripts/0/FS/fs.ex25.js'></script>
</head>
<style>
//test FSCSS
</style>
Enter fullscreen mode Exit fullscreen mode

Thanks for reading
Bless me with the like ❤️💖💝.

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay