Anthony Simone
https://slides.com/anthonysimone/paragraphs
asimone@elevatedthird.com
Design System Stage | Implementation |
---|---|
Intention | Wires and designs |
Structure | Data architecture and site building |
Execution | Presentation and theming |
Keyword | Role | ie - Label | ie - Machine Name |
---|---|---|---|
simple | Lightweight group of fields with little opinion about how it's used, very often used as nested component | Simple - Content | simple_content |
compound | More opinions about structure and layout, often more composition | Compound - Media Bar | compound_media_bar |
layout | Very highly opinionated structure or functionality tied to component, rarely nested inside other components | Layout - Tabs | layout_tabs |
Paragraphs Bundles | Paragraphs Fields |
---|---|
Definition | Implementation |
Owns responsibility or intention | # of paragraphs allowed |
Owns structure (content fields) | Types of bundles allowed |
Theme definition | Functionality (ie - slider, gallery) |
Simple - Content (simple_content) | field_p_content |
(definition)
simple_content
compound_content_bar
compound_media_bar
simple_image
simple_content
simple_card
(implementation)
Text
Text
field_p_content
The main component field on this landing page.
field_p_content_bar_items
The items allowed in this component.
field_p_media_item
The media feature for this component.
field_p_content_item
The content feature for this component.
Fields
Bundles
field_p_content
simple_content
compound_media_bar
simple_content
simple_image
field_p_media_item
field_p_content_item
compound_content_bar
simple_card
field_p_content_bar_items
simple_card
simple_card
simple_card
.paragraph--type--BUNDLE-NAME {
// Styles go here for items in this component only
// Every paragraph bundle should be handled this way
}
// Content like field for components on a landing page
.field--name-field-p-content {
& > .paragraph {
margin: 60px auto;
padding: 0 30px;
max-width: 1000px;
}
}
// Specific component with background color
.paragraph--type--BUNDLE-NAME {
.field--name-field-p-content & {
margin: 0;
max-width: 100%;
}
background-color: green;
.component-wrapper {
margin: 60px auto;
padding: 0 30px;
max-width: 1000px;
}
}
// Handle standard spacing for items with or without bg color
.paragraph {
// With the same bg color, collapse the padding
&.with-bg.bg-color-light-gray {
& + & {
padding-top: 0;
}
}
}
.paragraph--type--simple-content {
h2 {
color: blue;
.paragraph--type--compound-media-bar & {
color: orange;
}
}
}
.paragraph--type--simple-content {
.field--name-field-p-content & {
@include content-width(narrow);
}
}
field_title
field_description
field_p_tabs
compound_tab
tab_button
tab_content
Fields
Tab Components
View Modes
https://slides.com/anthonysimone/paragraphs
asimone@elevatedthird.com