@StatelessCode
  @StatelessCode
Stateless Code | Codecast: statelesscode.com WordPress 18: Use JavaScript to Add Elements for Tailwind Styling @StatelessCode | Uploaded March 2022 | Updated October 2024, 1 hour ago.
This is the 18th video in the statelesscode.com WordPress series. In this video Mike examines the HTML structure of the different sidebar to consistently apply the same Tailwind directives to the header and content of each widget.

He then hacks together some JavaScript that finds the sidebar widgets except for the search bar and login/logout ones and prepends an empty div so that the Tailwind inset styling can take place.

This video covers:
00:00:28 Introduction
00:01:03 Review HTML structure differences between widgets
00:01:45 Modify Tailwind directives to handle latest posts and latests comments
00:04:26 Use JavaScript to insert empty divs for the Tailwind inset styling
00:16:52 Refactor the JavaScript
00:23:22 Apply the Tailwind styles to the newly created DOM elements using directives
00:27:01 Fix mistake in JavaScript logic related to login/logout widget

This video is CC0 - No rights reserved. (YouTube doesn't allow this option when publishing.) All code is released under the UNLICENSE. Stateless Code denies the concept of "intellectual property". Copying is not stealing.
Codecast: statelesscode.com WordPress 18: Use JavaScript to Add Elements for Tailwind StylingCodecast: Create a RubyGem 68: Implement the First Magic MethodCodecast: statelesscode.com WordPress 15: Release 1 RetrospectiveWrite System Tests for Devise Login and LogoutCodecast: statelesscode.com WordPress 02: Get the Local Dev Environment Up and RunningCodecast: statelesscode.com WordPress 05: Use Tailwind to Style the HeaderCodecast: Getting Started with Rails 7 28: Retrospective for the SeriesCodecast: statelesscode.com WordPress 25: Release Version 0.2.0 of the ThemeCodecast: Getting Started with Rails 7 18: Destroy Comments with TurboMediocre Karaoke - A Kind of Magic by QueenMediocre A Capella Cover - Foil by Weird Al YankovicUpdate to Rails 7.0.7.2 and Upgrade Other Dependencies to Clear Dependabot Alerts

Codecast: statelesscode.com WordPress 18: Use JavaScript to Add Elements for Tailwind Styling @StatelessCode

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER