PHPackages                             cbl/blade-style - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. cbl/blade-style

ActiveLibrary[Templating &amp; Views](/categories/templating)

cbl/blade-style
===============

v1.1.0(2y ago)1918.3k33MITPHPCI failing

Since Jun 14Pushed 2y ago1 watchersCompare

[ Source](https://github.com/cbl/blade-style)[ Packagist](https://packagist.org/packages/cbl/blade-style)[ RSS](/packages/cbl-blade-style/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (4)Versions (16)Used By (3)

Blade Style
===========

[](#blade-style)

 [![Build Status](https://github.com/cbl/blade-style/workflows/tests/badge.svg)](https://github.com/cbl/blade-style/actions) [![License](https://camo.githubusercontent.com/e94ed4eccf45d2e87600fefe8be2042677ba1abf6e386729e147d518451d5bbc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f63626c2f626c6164652d7374796c653f636f6c6f723d253233333163363533)](https://packagist.org/packages/cbl/blade-style)

A package to easily minify styles and make use of sass, less, etc in your blade components.

```
{{ $slot }}

.btn{
    height: 2rem;
    line-height: 2rem;
    border-radius:3px;
}

```

Introduction
------------

[](#introduction)

Already some javascript frameworks (e.g. [Vue](https://vuejs.org/)) brought an architecture where styles and html markup could be written in the same file. This design pattern is a considerable simplification of the workflow in frontend development.

With blade styles there is no need to run a compiler when working on your styles. Also, only the styles of required blade components are included. This saves you from loading large css files and the size can be reduced to a minimum.

Compiler
--------

[](#compiler)

Currently there is a `Sass` compiler for blade styles. If you want to build a compiler for `Less` or `Stylus`, you can do so using the `Sass` package as an example.

- [Blade Style Sass](https://github.com/cbl/blade-style-sass)

Installation
------------

[](#installation)

The package can be easily installed via composer.

```
composer require cbl/blade-style
```

now the necessary assets must be published. This includes the style.php config and the storage folder where the compiled styles are stored.

```
php artisan vendor:publish --provider="BladeStyle\ServiceProvider"
```

Include Styles
--------------

[](#include-styles)

The blade component `x-styles` includes all required styles, so it may be placed in the head.

```

    ...

```

Usage
-----

[](#usage)

Each blade view can contain exactly one `x-style` component. Your styles can then be written inside the wrapper like so.

```

.my-image{
    border: 1px solid #ccc;
    border-radius: 3px;
}

```

You can build reusable blade components:

```
{{ $slot }}

.btn{
    height: 2rem;
    line-height: 2rem;
    border-radius:3px;
}

```

### Sass

[](#sass)

You may set a CSS extension langauge in the `lang` attribute, like so:

```
My Button

    $color: purple;

    .btn{
        background: $color;
    }

```

Optimizing Styles
-----------------

[](#optimizing-styles)

Blade styles share the same behavior as Views. As suggested in the [View documentation](https://laravel.com/docs/7.x/views#optimizing-views), the `style:cache` command can be added to your deployment workflow to ensure that all styles are compiled and thus improve performance.

```
php artisan style:cache
```

You may use the `style:clear` command to clear the style cache:

```
php artisan style:clear
```

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 92.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~102 days

Recently: every ~345 days

Total

15

Last Release

781d ago

Major Versions

v0.3.7 → v1.0.02020-08-25

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/29352871?v=4)[Lennart Carstens-Behrens](/maintainers/cbl)[@cbl](https://github.com/cbl)

---

Top Contributors

[![cbl](https://avatars.githubusercontent.com/u/29352871?v=4)](https://github.com/cbl "cbl (49 commits)")[![lpheller](https://avatars.githubusercontent.com/u/36259611?v=4)](https://github.com/lpheller "lpheller (3 commits)")[![felixdorn](https://avatars.githubusercontent.com/u/55788595?v=4)](https://github.com/felixdorn "felixdorn (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cbl-blade-style/health.svg)

```
[![Health](https://phpackages.com/badges/cbl-blade-style/health.svg)](https://phpackages.com/packages/cbl-blade-style)
```

###  Alternatives

[contao/core-bundle

Contao Open Source CMS

1231.6M2.8k](/packages/contao-core-bundle)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M508](/packages/pimcore-pimcore)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45444.2k1](/packages/pressbooks-pressbooks)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[appwrite/sdk-generator

SDK generator for Appwrite APIs across multiple programming languages and platforms

322207.2k3](/packages/appwrite-sdk-generator)[october/rain

October Rain Library

1601.7M83](/packages/october-rain)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
