All notable changes to the Variable Content Width snippet will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Table Scale Calculation: Fixed critical bug in source/editor mode where
--vcw-set-table-scaleused multiplication instead of division- Tables now correctly narrow when scale value increases (e.g., scale of 1.2 produces 83% width instead of 120%)
- Calculation now consistent with other scale variables (h1, h2, h3, callout)
- Affects table width in source mode when "Readable Line Length" is enabled
- Configurable Table Cell Text Wrapping: New overflow-wrap controls for table cells
- Added
--vcw-set-table-head-overflow-wrapCSS variable for table header cells - Added
--vcw-set-table-body-overflow-wrapCSS variable for table body cells - Style Settings integration with dropdown options:
break-word(default, recommended): Breaks words only when necessary to prevent overflownormal: Only breaks at spaces (standard behavior, may cause overflow)anywhere: Breaks at any character to prevent overflow
- Prevents horizontal overflow in tables with long URLs, code snippets, or compound words
- Applies to both preview mode and source/editor mode
- Especially useful in narrow panels and split-pane layouts
- Added
- CSS Refactoring: Improved code maintainability with modern CSS nesting
- Refactored
preview.csstable selectors to use nested syntax - Refactored
source.csstable editor selectors to use nested syntax
- Refactored
- Container Queries for Callouts: Enable container queries for callout elements
- Added
container-nameandcontainer-typeproperties to callout elements - Allows callout content to respond to the callout's own width
- Enables use of container width for wrapper elements within callouts
- Improves layout flexibility when callouts are scaled via
--vcw-set-callout-scale
- Added
- Build System: Migrated to PostCSS-based modular architecture
- Source files now organized in
src/modules/directory - Build process uses
postcss-import,postcss-nesting, andautoprefixer - Enables better code organization and maintainability
- Developers should use
npm run buildornpm run watchfor development
- Source files now organized in
- CI/CD Pipeline: GitHub Actions workflows for automated building and releases
- Build validation on every push/PR
- Automatic release creation when version tags are pushed
- Built CSS distributed via GitHub Releases, not committed to repository
- Release Script:
npm run prepare-releasefor streamlined version management - Documentation: Comprehensive guides for build system and release process
- Source code split into focused modules:
_vars.css,_containers.css,preview.css,source.css,mobile.css,a11y.css,print.css,debug.css - PostCSS nesting support for cleaner source code
- Source maps generated for easier debugging (not included in distribution)
- Built CSS removed from git tracking (
.gitignore) - GitHub Actions workflows:
build.ymlandrelease.yml - Updated all documentation to reflect CI/CD workflow
- Initial release of Variable Content Width CSS snippet
- Container query-based responsive design for true per-pane width control
- Full Style Settings plugin integration with GUI controls
- Support for both "Readable Line Length" ON and OFF modes
- Typography hierarchy controls (H1, H2, H3, Callout scaling)
- Advanced padding and width constraint customization
- Mobile-responsive design (follows theme defaults on <1024px screens)
- Accessibility features (reduced motion, high contrast support)
- Print optimization for clean PDF exports
- Comprehensive documentation and examples
- Intelligent Width Management: Uses
cqiunits for split-pane awareness - Style Settings Integration: 10+ configurable parameters with sliders and text inputs
- Typography Controls: Independent width scaling for headings and callouts
- Responsive Elements: Tables and diagrams adapt to container width
- Cross-Mode Compatibility: Works seamlessly in source and preview modes
- Modern CSS: Container queries, logical properties, CSS custom properties
- Performance Optimized: Efficient selectors and minimal DOM impact
- Minimum browser support: Chrome 105+, Firefox 110+, Safari 16+
- File size: <10KB CSS, no JavaScript dependencies
- Compatible with all major Obsidian themes
- Tested on Obsidian v1.4.16+ across Windows, macOS, and Linux
- Readable Width: Responsive (
85cqi) or fixed (800px) sizing - Width Constraints: Configurable min/max boundaries
- Typography Scaling: H1 (1.2x), H2 (1.15x), H3 (1.05x), Callouts (1.2x)
- Padding Control: Adjustable side spacing multiplier
- Element Breakout: Tables and wide content expansion rules
- Additional element types for responsive behavior
- Debug mode with visual content boundaries
- Theme-specific compatibility improvements
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
- Report bugs: GitHub Issues
- Feature requests: GitHub Discussions