# Table Width Hints: HTML Attributes + CSS Width Support ## Task Description Add support for author-specified column widths from HTML `width` attributes and CSS `width` property on `
| `, and ` | ` elements, using them as hints for column sizing in `processTable()`.
## Changes Made
### 1. CSS Layer (`lib/Epub/Epub/css/CssStyle.h`, `lib/Epub/Epub/css/CssParser.cpp`)
- Added `width` bit to `CssPropertyFlags`
- Added `CssLength width` field to `CssStyle`
- Added `hasWidth()` convenience method
- Updated `applyOver()`, `reset()`, `clearAll()`, `anySet()` to include `width`
- Added `else if (propName == "width")` case to `CssParser::parseDeclarations()` using `interpretLength()`
### 2. Table Data (`lib/Epub/Epub/TableData.h`)
- Added `CssLength widthHint` and `bool hasWidthHint` to `TableCell`
- Added `std::vector| `/` | ` handling: now parses `width` HTML attribute, `style` attribute, and stylesheet CSS width (via `resolveStyle`). CSS takes priority over HTML attribute. Stored in `TableCell::widthHint`
### 4. Layout (`processTable()`)
- Added step 3a: resolves width hints per column. Priority: ` | `) if needed.
- `rowspan` is not yet supported.
|
|---|