This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Document all css class selectors that are in the classy theme. | |
| <code> | |
| .foo { } | |
| .foo-bar { } | |
| </code> | |
| where it is filename.html.twig / filename.css | |
| <h3>Available css selectors in the Classy theme:</h3> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Your snippets | |
| # | |
| # Atom snippets allow you to enter a simple prefix in the editor and hit tab to | |
| # expand the prefix into a larger code block with templated values. | |
| # | |
| # You can create a new snippet in this file by typing "snip" and then hitting | |
| # tab. | |
| # | |
| # An example CoffeeScript snippet to expand log to console.log: | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Implements hook_preprocess_menu(). | |
| */ | |
| function vanilla_preprocess_menu(&$vars, $hook) { | |
| if ($hook == 'menu_main') { | |
| kint($hook); | |
| $items = $vars['items']; | |
| foreach ($items as $key => $item) { | |
| $original_title = $vars['items'][$key]['title']; | |
| $vars['items'][$key]['title'] = array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| libraries-override: | |
| core/modernizr: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {# | |
| .theme: | |
| function birch_preprocess_image_widget(&$variables, $hook) { | |
| // the image widget needs to know what the label is | |
| // look in admin/image-widget.hmtl.twig | |
| $variables['form_label_id'] = $variables['element']['#id']; | |
| } | |
| #} | |
| {# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {{ attach_library(active_theme()~'/form') }} | |
| {# find the unique name for the button. #} | |
| {% if element['#value'].getUntranslatedString() %} | |
| {% set element_name = element['#value'].getUntranslatedString()|clean_class %} | |
| {% else %} | |
| {% set element_name = element['#value']|clean_class %} | |
| {% endif %} | |
| {# We dont use form-submit or button--primary for the css so lets remove it. #} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Your snippets | |
| # | |
| # Atom snippets allow you to enter a simple prefix in the editor and hit tab to | |
| # expand the prefix into a larger code block with templated values. | |
| # | |
| # You can create a new snippet in this file by typing "snip" and then hitting | |
| # tab. | |
| # | |
| # An example CoffeeScript snippet to expand log to console.log: | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [base template name]--[view machine name]--[view display id].html.twig | |
| [base template name]--[view machine name]--[view display type].html.twig | |
| [base template name]--[view display type].html.twig2 | |
| [base template name]--[view machine name].html.twig | |
| [base template name].html.twig | |
| views styles | |
| https://www.sitepoint.com/theming-views-in-drupal-8-custom-style-plugins/ |