A New Collection of Thoughtful Learning Apps — Now Available on iOS & Android

Image
I’m excited to share a set of mobile apps I’ve recently completed and published on both the Google Play Store and the Apple App Store. These apps are designed with a simple goal in mind: to make meaningful, structured content more accessible, whether you’re studying theology or improving your English vocabulary. 📱 Now Available on Both Platforms All apps are live and available for download: Google Play Developer Page: https://play.google.com/store/apps/dev?id=5835943159853189043 Apple App Store Developer Page: https://apps.apple.com/ca/developer/q-z-l-corp/id1888794100 📖 Theology & Confession Study Apps For those interested in Reformed theology and classical Christian teachings, I’ve developed a series of apps that present foundational texts in a clean, focused reading format: The Belgic Confession Canons of Dort Heidelberg Catechism Westminster Shorter Catechism Each app is designed to provide a distraction-free experience, making it easier to read, reflect, and revisit these im...

Style Media States Without JavaScript: What Edge 158 Changes

Style Media States Without JavaScript: What Edge 158 Changes

Small media-player details often create surprising amounts of JavaScript. A card needs a glow while its video is playing, a loading indicator should appear during buffering, and a paused item needs a different visual treatment. Traditionally, code listens for media events and adds or removes classes.

Microsoft Edge 158, scheduled for November 19, 2026, adds media-state pseudo-classes that let CSS observe these states directly: :playing, :paused, :seeking, :buffering, :stalled, :muted, and :volume-locked. This is a useful reduction in state-management code, but it is not a reason to remove JavaScript blindly: MDN currently marks the selectors as limited availability, so a progressive enhancement strategy is still necessary.

A small example

Give the media element a meaningful container and keep the normal appearance as the fallback:

<article class="media-card"> <video controls preload="metadata" poster="lesson-poster.jpg"> <source src="lesson.mp4" type="video/mp4" /> <track src="lesson-en.vtt" kind="subtitles" srclang="en" label="English" /> <p>Your browser cannot play this video. <a href="lesson.mp4">Download it</a>.</p> </video> <p class="media-status" aria-live="polite">Ready to play</p> </article>
.media-card { border: 2px solid #d6dbe1; border-radius: 0.75rem; padding: 0.75rem; transition: border-color 160ms ease, box-shadow 160ms ease; } .media-status { color: #59636e; font-size: 0.9rem; } @supports selector(video:playing) { video:playing { outline: 3px solid #2f80ed; outline-offset: 3px; } .media-card:has(video:playing) { border-color: #2f80ed; box-shadow: 0 0 0 4px rgb(47 128 237 / 15%); } .media-card:has(video:buffering), .media-card:has(video:stalled) { border-color: #d97706; } .media-card:has(video:paused) { border-color: #8b95a1; } }

The @supports selector(...) feature query keeps the enhanced rules together and allows older browsers to retain the base design. The :has() relationship selector lets the card respond to the state of its descendant video. If the browser does not support either selector, the card remains usable rather than losing its styling.

What the states mean

  • :playing matches media that is playing. MDN notes that it can continue to match while playback is temporarily interrupted by conditions such as buffering.
  • :buffering means the media cannot continue because it is waiting for enough data. It also matches :playing, so do not use those selectors as mutually exclusive states.
  • :stalled is useful for a different failure or waiting treatment, but the UI should not imply that the application can repair every network problem.
  • :paused can provide a quiet visual state without a pause event handler.

These selectors describe the browser's media state; they do not replace the media controls, captions, error handling, or a product-specific status model. Keep the actual <audio> or <video> element accessible, provide captions where appropriate, and preserve a text or download fallback.

When JavaScript is still the right tool

CSS is a good fit when the only requirement is presentation: change a border, reveal a spinner, or dim a card. Use JavaScript when the state must drive behavior or text that CSS cannot supply, such as analytics, synchronizing a playlist, updating a custom control's accessible name, retrying a failed request, or coordinating several independent media elements.

If a custom status message is important, do not assume that a color or animation communicates it. A small event-driven layer can update an aria-live region, while CSS handles visual decoration where supported:

const video = document.querySelector("video"); const status = document.querySelector(".media-status"); video.addEventListener("waiting", () => { status.textContent = "Buffering…"; }); video.addEventListener("playing", () => { status.textContent = "Playing"; }); video.addEventListener("pause", () => { status.textContent = "Paused"; });

This is not a contradiction. The best migration is often to remove class-toggling code while retaining JavaScript for semantics and application behavior. Let CSS describe appearance, and let JavaScript handle information or actions that must be exposed beyond appearance.

How to adopt it safely

  1. Start with a useful fallback that does not depend on the new selectors.
  2. Put only presentational enhancements inside @supports selector(video:playing).
  3. Test the transitions that matter: play, pause, seek, buffering, stalled playback, muted playback, and an unavailable media source.
  4. Check keyboard operation, captions, focus indicators, reduced-motion preferences, and the contrast of every state.
  5. Use browser compatibility data and real target browsers before deleting existing event-driven behavior.

Edge 158 makes media-state styling more direct, and the selectors are now documented as part of the evolving web platform. The durable lesson is broader than this release: use browser state in CSS when the job is visual, feature-detect it, and keep JavaScript for behavior and accessibility that CSS cannot express.

References

❤️ Support This Blog


If this post helped you, you can support my writing with a small donation. Thank you for reading.


Comments

Popular Posts

A New Collection of Thoughtful Learning Apps — Now Available on iOS & Android

react-native run-android : do not build/update modified code(App.js)