<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="/rss-style.xsl" type="text/xsl"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>The Fylgja CSS Blog</title><description>News and updates about Fylgja CSS and more...</description><link>https://fylgja.dev/</link><language>en-us</language><item><title>Native CSS Utilities</title><link>https://fylgja.dev/blog/native-css-utilities/</link><guid isPermaLink="true">https://fylgja.dev/blog/native-css-utilities/</guid><description>A look into how the new and improved CSS attr() function will change the way we write CSS utilities.</description><pubDate>Thu, 29 Jan 2026 00:00:00 GMT</pubDate><content:encoded>With every passing year, CSS becomes more powerful.
The last few have brought amazing additions that are now becoming baseline, and 2026 is shaping up to continue that trend.

Today, we&apos;ll focus on one upcoming feature that will fundamentally change how we write CSS utilities: the `attr()` function.

## What is `attr()`?

The `attr()` function allows you to use HTML attribute values directly in your CSS.
In the past, its use was limited to the `content` property for displaying text, like showing a link&apos;s URL in a print stylesheet:

```html
&lt;a href=&quot;https://fylgja.dev/&quot;&gt;Explore FylgjaCSS&lt;/p&gt;
&lt;style&gt;
@media print {
  a[href^=&quot;https://&quot;]::after {
    content: &quot; (&quot; attr(href) &quot;)&quot;;
  }
}
&lt;/style&gt;
```

Soon, however, `attr()` will be usable with *any* CSS property and will support types beyond just strings.

This opens up a world of possibilities, especially for utility systems.
By adding a type similar to `@property` you can tell the browser what kind of value to expect:

```html
&lt;div data-grid-cols=&quot;2&quot;&gt;&lt;/div&gt;
&lt;style&gt;
[data-grid-cols] {
  --col-count: attr(data-grid-cols type(&lt;number&gt;), 1);
  display: grid;
  grid-template-columns: repeat(var(--col-count), minmax(0, 1fr));
}
&lt;/style&gt;
```

Here, we&apos;re telling the browser that `data-grid-cols` should be a `number`.
If an invalid value is provided (e.g., `#fff`), the browser will use our fallback of `1`.

## The Evolution of CSS Utilities

So, how does this change the way we build CSS Utilities? Let&apos;s look at the evolution of a simple padding utility.

### Step 1: Static, Generated Classes

The most common approach today is a static utility framework like Tailwind CSS,
which generates a separate class for each variation.

This is predictable and easy to use, but requires a large CSS file or a build step to generate the styles.

```html
&lt;div class=&quot;py-2 px-4&quot;&gt;&lt;/div&gt;
&lt;div class=&quot;py-3 px-5&quot;&gt;&lt;/div&gt;
&lt;style&gt;
/* Generated CSS */
.py-2 {
  padding-block: calc(var(--spacing) * 2);
}

.px-4 {
  padding-inline: calc(var(--spacing) * 4);
}

.py-3 {
  padding-block: calc(var(--spacing) * 3);
}

.px-5 {
  padding-inline: calc(var(--spacing) * 5);
}
&lt;/style&gt;
```

### Step 2: Dynamic Utilities with CSS Variables

To avoid large CSS files and build tools, we at Fylgja developed [Dynamic CSS Utilities] using inline styles to set CSS variables.

The CSS is minimal, but it comes at the cost of verbosity in the HTML.

```html
&lt;div style=&quot;--py: .5rem; --px: 1rem&quot;&gt;&lt;/div&gt;
&lt;div style=&quot;--py: var(--size-3); --px: 1.25rem&quot;&gt;&lt;/div&gt;
&lt;style&gt;
[style*=&quot;--py:&quot;] {
  padding-block: var(--py);
}

[style*=&quot;--px:&quot;] {
  padding-inline: var(--px);
}
&lt;/style&gt;
```

### Step 3: Native Utilities with `attr()`

The new `attr()` function gives us the best of both worlds:
the clean HTML of static classes and the dynamic,
build-free nature of CSS variables.

```html
&lt;div data-py=&quot;2&quot; data-px=&quot;4&quot;&gt;&lt;/div&gt;
&lt;div data-py=&quot;3&quot; data-px=&quot;5&quot;&gt;&lt;/div&gt;
&lt;style&gt;
[data-py] {
  padding-block: calc(var(--spacing) * attr(--data-py type(&lt;number&gt;), 1));
}

[data-px] {
  padding-inline: calc(var(--spacing) * attr(--data-px type(&lt;number&gt;), 1));
}
&lt;/style&gt;
```

This approach is clean, requires no build step, and gives us sensible defaults.
It even handles responsive variants elegantly:

```html
&lt;div data-md-py=&quot;2&quot;&gt;&lt;/div&gt;
&lt;style&gt;
@media (width &gt;= 768px) {
  [data-md-py] {
    padding-block: calc(var(--spacing) * attr(--data-py type(&lt;number&gt;), 1));
  }
}
&lt;/style&gt;
```

## Finding the Right Balance

Should `attr()` be used for everything
A hard **NO**. Utilities are great for simple, repeatable patterns like layouts, but they shouldn&apos;t replace well-crafted components.
They should complement them.

For example, our own `@fylgja/card` component can be combined with `attr()` based utilities
to create complex variations without writing new CSS:

```html
&lt;article class=&quot;card&quot; md-grid-cols=&quot;50px 1fr&quot; gap=&quot;4&quot;&gt;&lt;/article&gt;
```

Here, `md-grid-cols` and `gap` could be `attr()` utilities that apply layout styles at different breakpoints,
making the component system both flexible and readable.

## What&apos;s Next?

This new way of defining CSS utilities is exciting, but it&apos;s still on the horizon.
As of this writing, the typed `attr()` function is [only supported in Chrome and Edge](https://webstatus.dev/features/attr).

While we wait for broader browser support, you can experiment with this approach today.
We are exploring it for `@fylgja/utilities`,
and you can check out the [spacing utilities](https://github.com/fylgja/fylgja/blob/main/utilities/utils/experimental/spacing.css) we showed here.

A build tool could be an option in the future to create the fallback values, but for now, using inline CSS variables,
as shown in our [Dynamic CSS Utilities] concept, remains a great, cross-browser compatible solution.

[Dynamic CSS Utilities]: /docs/concepts/dynamic-css-utilities/

## A Quick Shout-Out

While writing this post, we did our own research and experimented with `attr()` support in Fylgja.
But we also took inspiration from these excellent articles by other developers exploring the same topic:

- [Advanced CSS `attr()`](https://una.im/advanced-attr) by Una Kravets
- [The Modern `attr()`](https://ishadeed.com/article/modern-attr/) by Ahmad Shadeed

We especially loved the approach to CSS Anchors in Una&apos;s article.
If you want to dive deeper into `attr()`, we highly recommend giving their posts a read.

For the most detailed technical information,
the MDN Web Docs are always the best place to check: [MDN `attr()`](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/attr).</content:encoded><category>CSS Props</category><category>FylgjaCSS</category><category>TailwindCSS</category><author>Sean van Zuidam</author></item><item><title>What Are Design Tokens, and Why Should You Care?</title><link>https://fylgja.dev/blog/what-are-design-tokens/</link><guid isPermaLink="true">https://fylgja.dev/blog/what-are-design-tokens/</guid><description>Learn what design tokens are, why they are essential for building scalable and consistent user interfaces, and how to use them with tools like the Fylgja Props Builder.</description><pubDate>Fri, 12 Sep 2025 00:00:00 GMT</pubDate><content:encoded>As developers and designers, we&apos;ve all been there. You&apos;re working on a new feature, and you need to use the brand&apos;s primary color. You open the inspector, find a button that looks right, and copy the hex code: `#3B82F6`. A week later, another developer does the same but samples it from a slightly different banner and gets `#3B83F7`.

Individually, these tiny inconsistencies are harmless. But they accumulate. Over time, your application&apos;s UI becomes a patchwork of &quot;almost-right&quot; values, leading to a messy user experience and a maintenance nightmare.

This is the problem that **Design Tokens** solve.

## What Exactly Are Design Tokens?

At their core, **design tokens are a methodology for managing your design decisions**. They are named entities that store the individual, low-level values of your design system, like colors, spacing, typography, and corner radii.

Think of them as variables for your design. Instead of hard-coding a value like `#3B82F6` directly in your CSS or UI component, you reference a token, for example, `color-brand-primary`.

These tokens are stored in a technology-agnostic format like JSON, so they can be used anywhere. Here&apos;s a simple example:

```json
{
  &quot;color&quot;: {
    &quot;brand&quot;: {
      &quot;primary&quot;: &quot;#3B82F6&quot;,
      &quot;secondary&quot;: &quot;#EC4899&quot;
    },
    &quot;text&quot;: {
      &quot;base&quot;: &quot;#1F2937&quot;,
      &quot;subtle&quot;: &quot;#6B7280&quot;
    }
  },
  &quot;font&quot;: {
    &quot;family&quot;: {
      &quot;sans&quot;: &quot;Inter, sans-serif&quot;
    },
    &quot;size&quot;: {
      &quot;base&quot;: &quot;1rem&quot;,
      &quot;lg&quot;: &quot;1.125rem&quot;
    }
  },
  &quot;spacing&quot;: {
    &quot;sm&quot;: &quot;0.5rem&quot;,
    &quot;md&quot;: &quot;1rem&quot;,
    &quot;lg&quot;: &quot;1.5rem&quot;
  }
}
```

This file becomes the **single source of truth** for your entire design system.

## Why Do They Matter?

Adopting a token-based approach might seem like extra work upfront, but it pays off massively by establishing a robust and scalable foundation for your UI.

### 🚀 Unbreakable Consistency

When every part of your application—from CSS styles to JavaScript components—references the same set of tokens, your UI becomes inherently consistent. If the brand&apos;s primary color ever needs to change, you update it in one place, and the change propagates everywhere automatically.

### 🤝 A Shared Language for Designers and Developers

Tokens bridge the communication gap between design and development. Designers can create their layouts in Figma or Sketch using tokens like `spacing-md`, and developers can implement the exact same token in the code. There&apos;s no more guesswork or manual value conversion.

### 🎨 Effortless Theming

Want to add a dark mode? Or support white-labeling for different clients? With design tokens, it&apos;s simple. You can create different token files for each theme. The application&apos;s structure remains the same; you just swap out the token values.

### A Familiar Face: Comparison to Tailwind CSS

If you&apos;ve ever used a utility-first CSS framework like Tailwind, you&apos;re already familiar with the concept of design tokens, even if you didn&apos;t call them that.

The `theme` object in your `tailwind.config.js` file is essentially a design token system.

```javascript
// tailwind.config.js
module.exports = {
  theme: {
    colors: {
      &apos;blue&apos;: &apos;#3B82F6&apos;,
      &apos;purple&apos;: &apos;#EC4899&apos;,
    },
    spacing: {
      &apos;1&apos;: &apos;8px&apos;,
      &apos;2&apos;: &apos;12px&apos;,
    },
    // ...etc
  },
}
```

When you use a class like `bg-blue` or `p-1`, you are referencing a design token. The power of a dedicated design token system is that it decouples these decisions from a specific framework, allowing you to use them across any platform or technology you need.

## Bringing Your Tokens to Life with Fylgja

So, you have your beautiful JSON file with all your design decisions. How do you turn that into usable CSS?

We built the **[@fylgja/props-builder](https://fylgja.dev/library/extensions/props-builder/)** to solve this exact problem. It&apos;s a powerful NPM package that takes your design token files and compiles them into a variety of formats, including CSS Custom Properties, Sass variables, and JavaScript objects.

This allows you to maintain a single source of truth and use your design decisions in whatever format your project needs.

The Props Builder is the final, critical step in making your design tokens a truly integrated part of your development workflow. By embracing design tokens with Fylgja, you&apos;re not just organizing your styles; you&apos;re investing in a more consistent, scalable, and collaborative future for your UI.</content:encoded><category>Design Tokens</category><category>CSS Props</category><category>Props Builder</category><category>TailwindCSS</category><author>Sean van Zuidam</author></item><item><title>Fylgja CSS 2.1 is Live: New Utilities, Performance Boosts, and More</title><link>https://fylgja.dev/blog/release-of-version-21/</link><guid isPermaLink="true">https://fylgja.dev/blog/release-of-version-21/</guid><description>This release brings a host of improvements across the Fylgja CSS library, focusing on new features, performance enhancements.</description><pubDate>Wed, 06 Aug 2025 00:00:00 GMT</pubDate><content:encoded>We&apos;re excited to announce the release of Fylgja CSS 2.1!
This update is packed with improvements across the Fylgja CSS library,
focusing on new features, performance enhancements.

Let&apos;s dive into what&apos;s new.

### **A More Accessible and Performant Foundation with [@fylgja/base]**

Our base styles have received significant upgrades to improve both accessibility and performance.
We&apos;ve enhanced `aria` attribute support for buttons, making it easier to manage states with JavaScript.

We&apos;ve also trimmed down the selector for the `::file-selector-button` and performed other cleanups to reduce the overall CSS size.

For a full breakdown of the changes, check out the [@fylgja/base] changelog.

### **More stable [@fylgja/tokens]**

A small but powerful addition, we&apos;ve introduced the `@property --hue` to our tokens.
This allows for smooth animations on all colors.
If you&apos;ve seen our homepage, you might have noticed the colors change when scrolling—this is all powered by the new `@property`,
which gracefully falls back if not supported.

In addition, we&apos;ve fixed and improved the `design-tokens` syntax to be more in line with the specification.

See all the token enhancements in the [@fylgja/tokens] changelog.

### **Powerful New [@fylgja/utilities]**

This release cleans up the divider utility, making it significantly smaller than the previous version.
The gap is now handled through the `flow` or `gap` utility instead of relying on a separate utility.

We&apos;ve also added several new utilities for text and the all-new `scroll-mask` utility for adding overflow shadows to scrollable elements.

For more details, see the [@fylgja/utilities] changelog.

We&apos;re confident that Fylgja CSS 2.1 will help you build better, faster, and more accessible websites. Update to the latest version today to take advantage of all these new features and improvements! We welcome your feedback and look forward to seeing what you create.

Happy coding!

[@fylgja/base]: https://github.com/fylgja/fylgja/blob/main/base/CHANGELOG.md
[@fylgja/tokens]: https://github.com/fylgja/fylgja/blob/main/tokens/CHANGELOG.md
[@fylgja/utilities]: https://github.com/fylgja/fylgja/blob/main/utilities/CHANGELOG.md</content:encoded><category>FylgjaCSS</category><category>Release</category><author>Sean van Zuidam</author></item><item><title>Fylgja CSS 2.0 is Live</title><link>https://fylgja.dev/blog/release-of-version-2/</link><guid isPermaLink="true">https://fylgja.dev/blog/release-of-version-2/</guid><description>Introducing Core Package Separation and Streamlined Architecture for a Better CSS Experience</description><pubDate>Wed, 19 Mar 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p class=&quot;lead&quot;&gt;Get ready for a significant evolution in Fylgja CSS!&lt;/p&gt;

We&apos;re excited to release Fylgja CSS 2, a fundamental shift in our CSS library&apos;s architecture.

This new version is built from the ground up with a focus on _modularity_, enhanced performance, and a streamlined _development experience_. We&apos;ve improved all facets, resulting in a more powerful and user-friendly CSS solution.

This release represents a complete rebuild of our core, making Fylgja CSS 2 a solid foundation for your projects.

## Why a New Foundation? _Addressing V1&apos;s Challenges and Enhancing Developer Experience_

In our journey working with Fylgja CSS v1, we learned a lot. While its modularity was a strength, managing numerous npm dependencies became a maintenance burden. We recognized the need to simplify this aspect and enhance the overall developer experience.

Fylgja CSS 2 tackles this by introducing a more streamlined package structure. We&apos;ve bundled our three core concepts into three dedicated packages.

* **Fylgja Base**  
  Encompasses the classless styles, including components like forms and buttons.
* **Fylgja Tokens**  
  Houses our CSS properties for colors, spacing, and more.
* **Fylgja Utilities**  
  Provides a curated set of helpful utility classes.

Each of the three core packages offers individual imports, allowing you to include only the specific parts you need, without compromising modularity.

## Embracing Modern _CSS for Enhanced Flexibility and Performance_

With this architectural overhaul, we&apos;ve also embraced modern CSS features that we planned but held back on to ensure stability. This includes the use of the `:is()` and `:where()` selectors, which significantly improve the ease of overriding styles and contribute to an even smaller overall footprint.

The bundling of core components has also led to noticeable size improvements. The Fylgja Base package, which includes all the essential default styles, clocks in at a lean 14kb.

Beyond the bundling and size optimizations, we&apos;ve also refined each of the three core packages:

### Fylgja Base _A Solid Foundation for Classless Styling_

Fylgja Base is now providing an exceptional classless styling experience. It&apos;s designed to make working with HTML or JSX feel intuitive and efficient.

By using semantic HTML, you can achieve well-styled pages, without the need to apply numerous classes.

&gt; [!Note]
&gt; Fylgja Base is not intended to be a traditional CSS Reset or Normalize.  
&gt; Instead, it aims to establish a sensible and improved browser default that you can build upon.

We&apos;re also excited to introduce a scoped version of typography styles, named `prose`, inspired by TailwindCSS&apos;s approach. Our implementation differs by prioritizing CSS inheritance, a often overlooked fundamental strength of CSS.

We plan to release presets for UnoCSS and TailwindCSS, allowing you to use the best of both worlds in your projects.

### Fylgja Tokens _A Refined and Dynamic Color System_

Fylgja Tokens have been optimized and streamlined, building upon the solid foundation of previous Fylgja packages for color, sizes, borders, shadows, and layers.

Unlike some other CSS property libraries like Open Props, our color system is dynamic. Instead of a long list of static values that can introduce unnecessary overhead and require build tools, we utilize a dynamic list of colors that can be modified using **hue** and **chroma** modifiers.

This allows you to easily set your own or predefined hues on the element or root selector:

```css
:root {
    --hue: var(--hue-blue);
}

.my-test-element {
    background-color: var(--color-10);
    color: var(--color-1);
}
```

And provides you with complete control while ensuring a consistent and manageable color system, and we&apos;ve refined the token values, making Fylgja Tokens as lean as possible without sacrificing functionality.

### Fylgja Utilities _Empowering You with Dynamic and Curated Tools_

Fylgja Utilities are not intended to replace comprehensive CSS utility systems like Tailwind CSS or UnoCSS. Instead, they are designed to complement these systems or provide a _lightweight utility solution_ when you prefer to avoid a full build toolchain.

They can be used directly without requiring build tools, and also offer compatibility when integrated with them.

This curated set of CSS utilities offers a range of handy features such as the Auto Grid and Snap.

We&apos;re also introducing new concepts for utilities, starting with _[Dynamic Utilities](/docs/concepts/dynamic-css-utilities)_. This approach ensures that utilities are applied at the component or page level, preventing unnecessary bloat in your global CSS.

A prime example is our approach to modifiers, like alignment utilities _(often seen in utility systems)_. In Fylgja, we offer a single alignment utility that can be customized using the power of CSS variables.

And we&apos;re taking this a step further with spacing utilities, allowing you to add padding to an element simply by using:

```html
&lt;button style=&quot;--px: 2rem&quot;&gt;Dynamic Utilities in action&lt;/button&gt;
```

This makes CSS utilities truly dynamic, ensuring that each value doesn&apos;t contribute to an ever-growing global CSS size.

## What&apos;s Next? _Expanding the Fylgja Ecosystem_

Our journey doesn&apos;t stop here! We&apos;re already working on expanding the Fylgja ecosystem with new _CSS Components_, the Input and Button Groups are already available.

### Updating from Fylgja CSS v1.x

Since Fylgja CSS 2 represents a complete rebuild, there isn&apos;t a direct automated upgrade path or script, however, due to the modular nature of even v1, you can gradually replace features from v1 with the new version.

For detailed information, please refer to our extensive [Library](/library/) and [Documentation](/docs).

## Share Your Thoughts and Support Fylgja CSS!

If you&apos;re as excited about Fylgja CSS 2 as we are, please take a moment to **star our Github Repository** ![GitHub Repo stars](https://img.shields.io/github/stars/fylgja/fylgja?style=social). Your support helps us grow and reach more developers!

We&apos;d also love to hear your feedback! Share your suggestions and opinions on our [Github Discussions](https://github.com/orgs/fylgja/discussions). If you write a blog post about Fylgja CSS 2, please share it with us on your favorite social media platform using our social media handle. We&apos;re eager to see what you build with Fylgja CSS 2!</content:encoded><category>FylgjaCSS</category><category>Release</category><author>Sean van Zuidam</author></item><item><title>Fylgja v1.2 is here!!</title><link>https://fylgja.dev/blog/release-of-version-12/</link><guid isPermaLink="true">https://fylgja.dev/blog/release-of-version-12/</guid><description>The second minor version of Fylgja has been released, and it includes some significant updates.</description><pubDate>Sat, 25 Jun 2022 00:00:00 GMT</pubDate><content:encoded>The second minor version of Fylgja has been released, and it includes some significant updates.

So what has changed between Fylgja v1.1 and v1.2.

- [Slim down existing components](#slim-down-existing-components)
- [New Native CSS Components, The Range Slider](#new-native-css-components-the-range-slider)
- [CSS props are here!](#css-props-are-here)
- [Preview components directly on Fylgja.dev](#preview-components-directly-on-fylgjadev)
- [And more!](#and-more)

## Slim down existing components

First, we have started working on enhancing the already-existing components by organising the code and rearranging it.

This introduces some improvements without compromising the exciting code base and reduces the size of the components.

As a result, many CSS components now have SCSS mixin options, which makes it simpler to use the strong foundation on your own class- or scope-specific styles.

## New Native CSS Components, The Range Slider

New to the block is the HTML Input Range Slider.

The Range slider will work out of the box if you load the `@fylgja/range` and use in your html the `&lt;input type=range&gt;`.

![Preview of the range slider on Fylgja.dev](range.png)

[Check out the Fylgja Range Component](/library/components/form-extend/#range-element)

## CSS props are here!

Surprise, surprise Fylgja has also added CSS props!

Despite the fact that Fylgja already integrates seamlessly with other CSS Props (Design Tokens) systems, such as [Open Props](https://open-props.style/) or [Pollen](https://www.pollen.style/modules/ui).

Additionally, we at Fylgja wanted to support our own version.

The Fylgja version will primarily concentrate on keeping the tokens straightforward, so there won&apos;t be any tokens with values that are exactly one to one.

With v1.2, we now provide;

- Colors
- Easing (transitions)
- Media Query tokens, based and part of the Mq component
- Shadow
- Sizes, for not just sizes but also typography and spacing.
- Z-layer (z-index)

[Check out the Fylgja CSS Props](/library/tokens/) for what is available.

## Preview components directly on Fylgja.dev

Even though we do provide this, we learned from user feedback that visitors were unable to find any demos or previews.

As a result, in addition to the already present view demo buttons, we are rolling out previews for each component, with few all ready live.

![Preview of the Forms on Fylgja.dev](form.png)

## And more!

- New bundle option for the CSS props
- Fixed import issue for utilpack [#40](https://github.com/fylgja/fylgja/issues/40)
- Fixed iOS selectbox has overflow when the text is to large for the box [#66](https://github.com/fylgja/fylgja/issues/66)
- Introduced `@layer` support for **auto-grid**, **button**, **container** and **stretched-link**, trough separate import, this will make it easier to be used Tailwind&apos;s `@apply`.

## Get the latest release

With Node;

```bash
npm install @fylgja@1.2
```

CDN:

```html
&lt;link href=&quot;https://unpkg.com/fylgja@1.2/fylgja.css&quot; rel=&quot;stylesheet&quot;&gt;
```

or get each CSS Component separately on the [Fylgja Components page](https://fylgja.dev/components/) as intended.</content:encoded><category>FylgjaCSS</category><category>Release</category><author>Sean van Zuidam</author></item><item><title>How to use Fylgja CSS with another exciting framework</title><link>https://fylgja.dev/blog/how-to-use-with-another-exciting-framework/</link><guid isPermaLink="true">https://fylgja.dev/blog/how-to-use-with-another-exciting-framework/</guid><description>Fylgja CSS is component based framework, meaning you can use each CSS component separately</description><pubDate>Tue, 21 Sep 2021 00:00:00 GMT</pubDate><content:encoded>&gt; [!note]
&gt; This is an older blog post from Fylgja CSS version 1, and while its examples do not reflect current practices, it is left in our blog for inspiration.

As we mention multiple times, on our site 😅, Fylgja is component based framework, meaning you can download and use each CSS component separately.

Making it easier to combine and use with other CSS frameworks or to add it to an existing project.

So how do you actually do this?

First make sure to understand what compiler your running. There are 2 use cases;

- SCSS based
- PostCSS based with postcss-import

most other tools have no impact with using Fylgja.

## How to use with Utility based frameworks, like TailwindCSS

So for example if you are running a [TailwindCSS](https://tailwindcss.com/) or other utility CSS based framework, like [WindiCSS](https://windicss.org/), thats one of the easiest use cases.

_The only components that might conflict are the Utilpack, Transition and Transform components, since these are also utility based CSS components._

So if you are using TailwindCSS you can simply install the `@fylgja/form` component and include it in your CSS like this.

```css
@import &quot;tailwindcss/base&quot;;
@import &quot;tailwindcss/components&quot;;

@import &quot;@fylgja/form&quot;;

@import &quot;tailwindcss/utilities&quot;;
```

And now you don&apos;t need to add any CSS classes for your form elements, since the `@fylgja/form` component styles them directly.

![Noice](https://fylgja.dev/images/noice.webp)

And this way you can also add more and more Fylgja CSS components without having to create them with utility classes.

So instead having to use `@apply` to create a Card component, You can just include it, just as with the form. The only difference is the Fylgja Card component uses classes, but that is just wat we want, moving to a more DRY approach and still using the flexibly of utility classes. 😄

## How to use with Component based frameworks, like Bootstrap

This is a little harder since some components already exists, so make sure to disable the CSS Component you want to replace.

So you can add CSS Components that don&apos;t exist in Bootstrap, or replace existing ones with Fylgja CSS components.

For Bootstrap you could extend the utilities with our Utilpack component, adding more utility power, or add some Native CSS components like the form to simplify the HTML.

So how do you actually remove CSS components from Bootstrap?

First make sure that you don&apos;t import Bootstrap using a single import. Instead load everything from the `bootstrap.scss` file separately,

```css
@import &quot;bootstrap&quot;;
```

load everything separately, like this;

```css
// Configuration
@import &quot;functions&quot;;
@import &quot;variables&quot;;
@import &quot;mixins&quot;;
@import &quot;utilities&quot;;

// Layout &amp; components
@import &quot;root&quot;;
@import &quot;reboot&quot;;
@import &quot;type&quot;;
...
@import &quot;offcanvas&quot;;
@import &quot;placeholders&quot;;

// Helpers
@import &quot;helpers&quot;;

// Utilities
@import &quot;utilities/api&quot;;
```

and include this in your `main.css` with the newer `@use` syntax.

Now in your `main.css` add your Fylgja Components like you normally do.
And in your custom Bootstrap import, you can disable unused components or components you want to replace with Fylgja Components.</content:encoded><category>FylgjaCSS</category><category>TailwindCSS</category><category>Bootstrap</category><category>Guides</category><category>Faq</category><author>Sean van Zuidam</author></item><item><title>Fylgja a new CSS framework, WHY!</title><link>https://fylgja.dev/blog/fylgja-a-new-css-framework-why/</link><guid isPermaLink="true">https://fylgja.dev/blog/fylgja-a-new-css-framework-why/</guid><description>Time to introduce Fylgja a new CSS framework</description><pubDate>Sun, 29 Aug 2021 00:00:00 GMT</pubDate><content:encoded>Time to introduce Fylgja a new CSS framework, there are already a lot of CSS frameworks, almost everybody knows Bootstrap, Material and Tailwind.

None of them are bad, each of them does the job, and if one of them fits the way you are working, you&apos;re probably happy.

Looking around on dev.to you would find articles, describing CSS frameworks and their pros and cons.

&gt; The Best is of course opinionated, choose what works for you,
&gt; and always check Github to see if there is active development.
&gt; A dead framework is not a great investment.

So why! Fylgja, well because its a very good tool for frontenders who understand CSS and need a consistent basis for their projects.

Some history, years ago we started working with Bootstrap 2, using it for frontend design, we developed it as an extend / utility pack to give us tools to work better and faster.

Initially developed with LESS and Grunt we switched to SCSS and GULP, and it became a daily tool for us, [read the full story here](https://fylgja.dev/about).

On the road we learned from others and we continuously kept developing it to improve things, and since we are only human and are proud of our product we like to share it with you all.

We put it on Github and released version 1 on 22 June this year, you can find the Website with the documentation on Fylgja.dev

Of course, we could fill this article with exaggerating marketing text, telling you how good it is, and why we’re the best (we are 😁) but no BS here, Take a look, try it out, use it and contribute if you like.

_[Originally published on dev.to](https://dev.to/fylgja/fylgja-a-new-css-framework-why-3b0n)_</content:encoded><category>FylgjaCSS</category><category>Release</category><author>Sean van Zuidam</author></item></channel></rss>