Skip to content

Conversation

@BobPritchett
Copy link

@BobPritchett BobPritchett commented Jul 1, 2025

Support for most borders (solid, dashed, dotted, double) and border-radius values.

Enhanced the index.html test harness with multiple samples.

Open issues:

  • Percentage based border-radius aren't working; it isn't clear if the error is in the parser or further in the processing, but it doesn't look like they get to the drawing code, so likely in parsing. Also seeing weird behavior around units; border-radius: 96px / 48px works; border-radius; 4em / 2em does not.
  • Unable to run tests; do they need to be updated to reflect other recent changes?
  • Bug in 'hidden' border style: reserves space for border (unlike none), but it shouldn't.
  • Added .prettierignore to prevent auto-formatting on save when set globally in IDE; with AI code writing and more we may want to configure for prettier just to minimize change conflicts.

…radius values and add blockify method to Style class for block display handling.
- Introduced a new layout system specification document detailing the Dropflow layout engine, including core components, layout processes, and border drawing integration.
- Added a .prettierignore file to exclude all project files from formatting.
- Created a new examples.js file containing various HTML examples to demonstrate layout capabilities, including typography, grid layout, and box layout with different border styles.
- Updated index.html and index.js to integrate the examples and enhance the user interface with a toolbar for selecting examples.
- Updated the BoxBorder interface to use ComputedBorderRadius for corner radius values, improving type consistency.
- Introduced a new hasBorderRadius function to determine if a border has a radius based on its properties.
- Refactored paintFormattingBoxBackground to utilize the new hasBorderRadius function for better clarity and efficiency.
- Modified CSS parsing rules to replace LENGTH with length_side for border radius properties, ensuring accurate parsing of side lengths.
- Adjusted style definitions to align with the new ComputedBorderRadius type for better integration across the codebase.
- Renamed "Typography Showcase" to "Typography Tests" for clarity.
- Enhanced typography section with detailed font weights, styles, and semantic elements.
- Improved text examples to include various text decorations and styles for better demonstration of capabilities.
- Updated the border-radius parsing rules to support both horizontal and vertical radius values, allowing for more flexible CSS definitions.
- Introduced helper functions for expanding radius values and handling slash-separated radius lists.
- Refactored related functions to improve clarity and maintainability, ensuring consistent handling of border radius properties across the codebase.
- Bump version from 0.5.1 to 0.6.0 in package-lock.json.
- Update @ddietr/codemirror-themes dependency to version 1.5.1.
- Add @types/codemirror and @types/tern as new dev dependencies.
- Change import statements in box-border.ts to use type imports for better clarity.
- Remove unnecessary border radius object in paint.ts to streamline code.
- Updated the handling of percentage values for border-radius to calculate horizontal and vertical radii based on the box's border area, improving accuracy.
- Simplified the resolveEm function to handle percentage units more effectively, ensuring consistent unit resolution across styles.
@chearon
Copy link
Owner

chearon commented Oct 7, 2025

I would love to have this. It's a bit hard to review right now because there are so many changes unrelated to border-radius.

I'd suggest first removing .vscode/launch.json, docs/layout-system.md, the changes to site/, .prettierignore, etc. Who knows, I may have all of those one day, but each of them require different discussions, so I'd prefer them to be in separate PRs.

Then you could remove the formatting changes. You might git reset $(git merge-base HEAD master), then stage only the necessary changes via git add -p or with your IDE, though it would take a while. If that bores you to tears, I might not mind doing it myself!

I'll leave a review of box-border.ts next, which I'm still digesting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants