Drupal Blocks

Adding a Custom Block to Drupal 8's Fluid UI Module

The Fluid UI module for Drupal 8 is a great way to improve the accessibility and 508/ADA compliance of a website. The one problem I have with the module is that it renders it's "accessibility block" outside of Drupal's block system via hook_page_top(). What if you wanted to treat the block like any other? What if you wanted to assign it to one of Drupal's block zones?

Full disclosure -- I'm not a PHP developer. In all honesty, I am a front end dev who works mostly in SASS/CSS with the occasional foray into JavaScript and jQuery. So, I'll admit to starting this project with my feet firmly planted into the deep end of the PHP pool; I'm not really tall enough to keep my head above water. PHP, for me, is less about swimming and more about not drowning. At the same time, any chance to dig into the guts of Drupal and get my hands dirty with code is generally something I welcome.

Drupal Module: Share by Mail Failure in Social Media Share Module

This is a rather otaku (nerdy) error you may find when using the Social Media Share module for D8: when trying to share by mail the browser opens the mail client with an incomplete title and body. Except, it only does it for certain articles. Sounds like a mystery; it's not.
share block
A simple block allowing users to share an article by mail.

A little background: one of my clients recently put together a blog. On that blog, we were careful to put together a custom styled share block using the Social Media Share module--we run the D8 version (8.x-1.8).

Javascript: Change Parent Styling if Child Element Exists

SASS/CSS can accomplish magic. Sometimes, however, its logic doesn't go quite far enough, and you need a little help from Javascript.

In Sass/Css, the rules of specificity allow us to create styling at a high level and then override it with minimal effort when it comes to more specific cases. For example, I could go into my site theme and write out a general rule: color all links red. When an exception to that rule arises, I can target the parent element of that specific link (a div, for example) to create a new rule: color all links red, but color any link with the parent X blue.