Document CSS media sizing rule: never width 100% with max-height
This commit is contained in:
parent
7cd749cf5f
commit
fd33376cb7
1 changed files with 2 additions and 0 deletions
|
|
@ -179,6 +179,8 @@ Always use `uuid_str` when you need a string copy of the identifier. Models inhe
|
|||
|
||||
**CSS LAYOUT REQUIREMENTS**: This project uses CSS Grid exclusively for layout. NEVER use Flexbox (flex) for layout. Always use CSS Grid properties for positioning and alignment.
|
||||
|
||||
**CSS MEDIA SIZING**: Never combine `width: 100%` with `max-height` on media elements (img, video). `width: 100%` forces the element to span the full container even when `max-height` constrains the rendered content, creating dead whitespace. Use `width: auto` + `max-width: 100%` + `max-height` instead — the element shrinks to match the actual content aspect ratio within both constraints.
|
||||
|
||||
**TESTING INTEGRITY**: NEVER skip, delete, or disable unit tests or integration tests when they break. When tests fail:
|
||||
1. **FIX THE TESTS** - Update them to work with new functionality
|
||||
2. **FIX THE CODE** - If the tests reveal actual bugs, fix the underlying issue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue