krypton/styles

A style class in PHP

Maintainers

Package info

github.com/taranjeet2022/styles

Homepage

Issues

pkg:composer/krypton/styles

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

0.0.1-alpha 2023-06-01 18:15 UTC

This package is auto-updated.

Last update: 2026-03-29 01:02:28 UTC


README

The PHP Styles Class allows you to print styles.

How to install?

composer require krypton/styles

How to use?

A simple example ...

<?php

use Krypton\Styles\Styles;

$css = [
    [
      'names' => [
        '.red'
      ],
      'attrs' => [
        'color' => '#F00'
      ]
    ],
    [
      'names' => [
        '.blue'
      ],
      'attrs' => [
        'color' => '#F0F'
      ]
    ],
    [
      'names' => [
        '.grey'
      ],
      'attrs' => [
        'color' => '#999'
      ]
    ],
    [
      'names' => [
        '.green'
      ],
      'attrs' => [
        'color' => '#0F0'
      ]
    ]
];

$styles = new Styles($css);
echo $styles->render();

License

This class is provided under GPL license http://www.gnu.org/licenses/gpl.html