Inline Css Wrapper

A wrapper that only applies while there is inline css attached.

With styling parameter.

Without styling parameter.

<!-- typography.blade.php   original: h2 -->
<h2 class="c-typography u-margin__bottom--2 c-typography__variant--h2" data-uid="662e6cb36cd16">
    With styling parameter.
</h2>    <!-- inlineCssWrapper.blade.php -->
    <div class="c-inlinecsswrapper" style="padding: 8px; background-color: blue; border-radius: 100%; display: inline-flex;" data-uid="662e6cb36ce30">
        <!-- icon.blade.php -->
    <span class="c-icon c-icon--restaurant c-icon--material c-icon--material-restaurant material-symbols-outlined material-symbols-outlined--filled c-icon--color-primary c-icon--size-xl" material-symbol="restaurant" role="img" aria-label="Icon: Undefined" alt="Icon: Undefined" data-nosnippet="" translate="no" aria-hidden="true" data-uid="662e6cb36cd9d">
            </span>
    </div>

    <!-- typography.blade.php   original: h2 -->
<h2 class="c-typography u-margin__bottom--2 c-typography__variant--h2" data-uid="662e6cb36ce78">
    Without styling parameter.
</h2>    <!-- inlineCssWrapper.blade.php -->
    <!-- icon.blade.php -->
    <span class="c-icon c-icon--restaurant c-icon--material c-icon--material-restaurant material-symbols-outlined material-symbols-outlined--filled c-icon--color-primary c-icon--size-xl" material-symbol="restaurant" role="img" aria-label="Icon: Undefined" alt="Icon: Undefined" data-nosnippet="" translate="no" aria-hidden="true" data-uid="662e6cb36ceba">
            </span>
@typography([
    'element' => 'h2',
    'classList' => ['u-margin__bottom--2']
])
With styling parameter.
@endtypography
@inlineCssWrapper([
    'styles' => [
        'padding' => '8px',
        'background-color' => 'blue',
        'border-radius' => '100%',
        'display' => 'inline-flex'
    ]
])
@icon([
    'icon' => 'restaurant',
    'size' => 'xl',
    'color' => 'primary',
])
@endicon
@endinlineCssWrapper

@typography([
    'element' => 'h2',
    'classList' => ['u-margin__bottom--2']
])
Without styling parameter.
@endtypography
@inlineCssWrapper([
])
@icon([
    'icon' => 'restaurant',
    'size' => 'xl',
    'color' => 'primary',
])
@endicon
@endinlineCssWrapper

Blade component parameters

Key Default value Type Available values Description
componentElement div string - -
styles [] array - -
id string - The DOM id of the component.
classList [] array - Array containing wrapping classes array
attributeList [] array - Array containing keys and values rendered as attributes
containerAware false boolean true/false Makes the component container aware. Appends modifiers --size--xs/sm/md/lg to the component.
Settings location: /var/www/webroot/ROOT/vendor/helsingborg-stad/component-library/source/php/Component/InlineCssWrapper/inlineCssWrapper.json