Saltar al contenido principal

5 publicaciones etiquetados con "Styling"

CSS, theming, and design guides for webforJ apps.

Ver todas las etiquetas

A Java design system built in: webforJ DWC tokens and themes

· 8 min de lectura
Lauren Alamo
Software Developer

cover image

If you've been wondering whether a Java design system is something your team has to build on top of the framework, I have good news. webforJ ships one called DWC: a set of CSS custom properties for color, typography, spacing, borders and shadows, three built-in themes, palettes generated from a seed color, and Shadow Parts for the places tokens don't reach. Override a few variables and the whole app takes on your brand.

Dark mode in a Java web app: themes, toggle, saved choice

· 8 min de lectura
Eric Handtke
Software Developer

cover image

To add dark mode in a Java web app with webforJ, put @AppTheme("system") on your App class and register a light and a dark theme with @AppLightTheme and @AppDarkTheme. The app then follows the operating system setting. To let users choose for themselves, call App.setTheme() from a control in your header and save the answer with LocalStorage.

webforJ ships a light and a dark theme, so every component already has a dark variant. The only work left for you is your own CSS. This post covers the setup, the switch, the saved choice and how to write custom styles that hold up in both modes.

Transform Your webforJ App with Professional Theming

· 6 min de lectura
Lauren Alamo
Software Developer

cover image

Modern applications need flexible theming systems. Users expect dark mode support, but they also want apps that reflect brand identity and adapt to different contexts. Building themes traditionally meant maintaining separate stylesheets, duplicating CSS rules, and coordinating updates across multiple files.

webforJ takes a different approach with a theming system built around CSS variables and semantic color palettes. You can implement dark mode, create custom brand themes, and switch between them at runtime.

Let's walk through how it all works together.

Building Better CSS with webforJ's Styling System

· 7 min de lectura
Lauren Alamo
Software Developer

cover image

I've spent the better part of a year building webforJ demos and documentation, and honestly, it's taught me that I knew a lot less about CSS than I thought. I thought I knew enough to get by, some selectors, basic properties, maybe a flexbox here and there. Turns out there's a difference between writing CSS that works and writing CSS that actually makes sense.

Working on webforJ's styling system has changed how I approach CSS. It handles common tasks well and gets out of your way for the interesting parts. Plus, I no longer spend half my time wondering why my styles disappeared into the void.