Releases: atiladefreitas/tinyunit
Releases · atiladefreitas/tinyunit
Release list
v1.1.0 - Enhanced CSS Unit Converter
🎯 TinyUnit v1.1.0 - Enhanced CSS Unit Converter
What's Changed
TinyUnit introduces significant improvements to em unit handling and better user experience:
- Added separate parent font size support for accurate
emcalculations - Introduced
:TinyUnitParentcommand for dynamic parent font size adjustments - Enhanced UI with parent font size display in converter window
- Improved keymap discoverability with descriptive messages
- Fixed
emcalculations to properly reflect CSS specifications
Technical Details
New Features
- Parent font size configuration independent from root font size
- Real-time parent font size updates through command interface
- Accurate distinction between
rem(root-relative) andem(parent-relative) calculations
Configuration Updates
{
font = {
base_size = 16, -- Root font size for rem calculations
parent_size = 14 -- Parent font size for em calculations (optional)
}
}Commands
:TinyUnitParent <size>- Set parent element font size for em calculations
Example::TinyUnitParent 12sets parent font size to 12px
Installation
Using Lazy.nvim:
{
"atiladefreitas/tinyunit",
version = "v1.1.0",
config = function()
require("tinyunit").setup({
font = {
base_size = 16, -- Optional: customize root font size
parent_size = 14 -- Optional: set different parent font size
}
})
end
}Migrating From v1.0.0
The update is fully backward compatible. No migration steps are required.
- Existing configurations will continue to work
- Parent font size defaults to base font size if not specified
- New font configuration options can be added as needed
Bug Fixes
- Fixed
emcalculations to correctly use parent font size instead of root font size - Improved unit conversion accuracy for relative units
Acknowledgments
Thanks to the community for valuable feedback on em unit handling and CSS specifications.
v1.0.0 - Initial Release
🎯 Initial Release - CSS Unit Converter for Neovim (v1.0.0)
What's Changed
TinyUnit launches with a robust set of features designed to streamline unit conversions directly within Neovim:
- Introduced floating window interface for quick unit conversions
- Implemented comprehensive unit conversion system supporting px, rem, em, mm, cm, in, and pt
- Added visual selection support for converting existing measurements
- Integrated clipboard management for seamless conversion and pasting
- Established configurable base font size for relative unit calculations
Technical Details
Core Features
- Accurate conversion formulas using standard web and print measurements
- Dynamic window positioning based on editor dimensions
- Efficient text selection and replacement system
Unit Conversion System
- Pixel-perfect conversions between absolute and relative units
- Industry-standard constants: 96px per inch, 72pt per inch
- Precise handling of floating-point calculations with clean decimal formatting
Configuration
{
window = {
width = 30, -- Width of the floating window
height = 15, -- Height of the floating window
border = "rounded", -- Border style
title = "Unit Converter",
input_title = "Enter Value",
},
keymap = {
open = "<leader>tc", -- Toggle converter window
close = "q", -- Close window
convert = "<CR>", -- Convert value
escape = "<Esc>", -- Close window
},
base_font_size = 16, -- Base size for rem/em calculations
}Installation
Using Lazy.nvim:
{
"atiladefreitas/tinyunit",
version = "v1.0.0",
config = function()
require("tinyunit").setup()
end
}Migrating From Previous Versions
This is the initial release of TinyUnit. No migration steps are necessary.
Acknowledgments
Special thanks to the Neovim community for inspiration and best practices in plugin development.