Download the PHP package fractas/elemental-stylings without Composer
On this page you can find all versions of the php package fractas/elemental-stylings. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fractas/elemental-stylings
More information about fractas/elemental-stylings
Files in fractas/elemental-stylings
Package elemental-stylings
Short Description Collection of useful and reusable SilverStripe Elemental stylings properties
License BSD-3-Clause
Homepage http://github.com/fractaslabs/silverstripe-elemental-stylings
Informations about the package elemental-stylings
SilverStripe Elemental Stylings
Introduction
This module extends a SilverStripe Elemental Blocks to enhance its functionalities with predefined sets of Classes of Styling elements.
Predefined Styling classes:
- StylingHeight - changes a height of a Block
- StylingHorizontalAlign - changes a horizontal alignment of a Block
- StylingLimit - changes a limit of a Block
- StylingSize - changes a size of a Block
- StylingStyle (extended from Core module) - special enhancements for a class extended from Core module
- StylingTextAlign - changes a text alignment inside of a Block
- StylingVerticalAlign - changes a vertical alignment of a Block
- StylingWidth - changes a width of a Block (example uses Bootstrap Grid syntax)
The module provides basic markup for each of the stylings but you have an option to edit and/or replace those predefined styles.
Requirements
- SilverStripe CMS ^4.0
- SilverStripe Elemental Blocks ^4
Installation
-
Install a module via Composer
- Follow an instructions for installation of Elemental Blocks module
-
Apply a desired Styling Class extension on Block class (ie. ElementContent that ships with Core module) mysite/_config/elements.yml
- Add an desired styles based on your preferences, see Configuration example
-
Optionaly, you can require basic CSS stylings provided with this module to your controller class like: mysite/code/PageController.php
- Build and flush your project
Full configuration example
This is a sample configuration for use of Stylings classes in YML configuration.
mysite/_config/elements.yml
Implementation example: 'Text with Image' Element
- New Element class file: ElementContentImage.php
- New Element template file: ElementContentImage.ss
Screenshots
Updated GridField with preview of applied stylings:
Styling tab of a Block with icons for specific styles:
Reporting Issues
Please create an issue for any bugs you've found, or features you're missing.
License
See License
Credits
Styling icons from IcoMoon - Free by IcoMoon
All versions of elemental-stylings with dependencies
silverstripe/vendor-plugin Version ^1.0