Streamline your CSS with Gerillass: A Sass library for efficient styling

Halil İbrahim Çakıroğlu
Gerillass
Published in
3 min readMar 5, 2023

If you intend to become a web developer, you’ve probably heard of CSS, the language used to style HTML documents. CSS is an essential part of web development, but it can quickly become unwieldy as your project grows in size and complexity. Fortunately, tools like Sass and Gerillass can help you write cleaner, more efficient CSS.

Sass, which stands for Syntactically Awesome Style Sheets, is a CSS preprocessor that allows you to use variables, mixins, and other programming constructs to generate CSS. This can save you a lot of time and effort by automating repetitive tasks and allowing you to reuse code across multiple stylesheets.

On the other hand, Gerillass is a Sass mixins library that builds on top of Sass to provide additional functionality and improve your workflow. It includes a variety of mixins and functions that can simplify common tasks like creating responsive designs, styling form elements, etc.

Why use Gerillass?

I’d love to point out some of the main reasons why Gerillass is such a great tool for developers:

  1. Improved productivity: With Gerillass, you can write CSS more quickly and efficiently, which means that you’ll spend less time and effort creating and maintaining stylesheets.
  2. Better organization: Gerillass provides a set of well-organized and structured mixins and functions. This makes it much easier to organize your code and keep your stylesheets modular and maintainable.
  3. Increased consistency: By using Gerillass mixins and variables, you can ensure that your stylesheets are consistent. This makes them easier to maintain and update over time.
  4. Enhanced responsiveness: Gerillass includes a range of responsive mixins and functions that make it easy to create responsive designs that work seamlessly across different devices and screen sizes.
  5. Accessibility: Gerillass also includes a set of mixins and functions that help developers create accessible designs that are optimized for users with disabilities.

See Gerillass in action!

One of Gerillass’s coolest features is its breakpoint mixin. With this mixin, you can define media query breakpoints in a way that’s super easy to read and maintain. Instead of spending lots of time crafting lengthy media queries by hand, you can just use the breakpoint mixin and specify the size of the breakpoint you want.

Want to see it in action? Check out this example that shows how it can be used to create a responsive design:

Here’s the CSS output.

In this example, we’re using the breakpoint mixin with predefined values that come with Gerillass to apply different background colors to an HTML element with a class .element depending on the current breakpoint.

Conclusion

Gerillass includes many other mixins and functions that can help you streamline your CSS workflow. For instance, the except mixin lets you apply styles to all elements except those that match a specific selector. Additionally, you can use the clearfix mixin to clear floats without adding extra markup. How cool is that?

Gerillass is a powerful tool that can help you write better CSS in less time. By using it, you can improve your workflow, reduce code duplication, and create more maintainable stylesheets.

Hope that helps! Let me know if you have any questions.

If you’re interested in learning more about Sass and Gerillass, be sure to check out the following resources:

--

--

Halil İbrahim Çakıroğlu
Gerillass

“The back button is one click away, and you don’t often get a second chance!” says the wiseman.