jdaugherty commented on PR #15560:
URL: https://github.com/apache/grails-core/pull/15560#issuecomment-4201997059

   > @jdaugherty isn't there already css framework specific classes in 
virtually every other grails tag?
   > 
   > This really has nothing to do with scaffolding. It targets `flash.message`s
   
   Doing some analysis with AI thinks that bootstrap classes aren't hard coded 
today - only the basic grails classes: 
   
   # Grails TagLib CSS Classes Audit
   
   An inventory of all hardcoded CSS classes in shipped Grails tag libraries.
   
   ## UrlMappingTagLib — Pagination & Sorting
   
   **File:** 
`grails-gsp/plugin/src/main/groovy/org/grails/plugins/web/taglib/UrlMappingTagLib.groovy`
   
   ### `<g:paginate>`
   
   | CSS Class | Overridable? | Notes |
   |-----------|-------------|-------|
   | `prevLink` | No | Applied to the previous page link |
   | `nextLink` | No | Applied to the next page link |
   | `step` | No | Applied to each page number link |
   | `step gap` | No | Hardcoded `<span class="step gap">..</span>` for 
ellipsis gaps |
   | `currentStep` | Yes (`activeClass` attr) | Default class for the 
active/current page |
   
   ### `<g:sortableColumn>`
   
   | CSS Class | Overridable? | Notes |
   |-----------|-------------|-------|
   | `sortable` | No | Always added to the column |
   | `sorted` | No | Added when column is the active sort column |
   | `asc` / `desc` | No | Sort direction appended as a class alongside 
`sorted` |
   
   ## FormFieldsTagLib — Field Wrappers
   
   **File:** 
`grails-fields/grails-app/taglib/grails/plugin/formfields/FormFieldsTagLib.groovy`
   
   ### `<f:field>`
   
   | CSS Class | Overridable? | Notes |
   |-----------|-------------|-------|
   | `fieldcontain` | Yes (`class` attr) | Default wrapper div class |
   | `error` | Yes (`invalidClass` attr) | Added when the field has validation 
errors |
   | `required` | Yes (`requiredClass` attr) | Added when the field is required 
|
   | `required-indicator` | No | Hardcoded on `<span>` containing `*` |
   
   ## RenderTagLib — Error/Exception Display
   
   **File:** 
`grails-gsp/grails-web-gsp-taglib/src/main/groovy/org/grails/plugins/web/taglib/RenderTagLib.groovy`
   
   ### `<g:renderException>`
   
   | CSS Class | Overridable? | Notes |
   |-----------|-------------|-------|
   | `error-details` | Yes (`detailsClass` attr) | Default class on the `<dl>` 
element |
   | `stack` | Yes (`stackClass` attr) | Default class on the `<pre>` element 
for stack traces |
   
   ## Summary
   
   | TagLib | Tag | Total Classes | Overridable | Not Overridable |
   |--------|-----|---------------|-------------|-----------------|
   | UrlMappingTagLib | `paginate` | 5 | 1 | 4 |
   | UrlMappingTagLib | `sortableColumn` | 3 | 0 | 3 |
   | FormFieldsTagLib | `field` | 4 | 3 | 1 |
   | RenderTagLib | `renderException` | 2 | 2 | 0 |
   | **Total** | | **14** | **6** | **8** |
   
   ## Assessment
   
   - **No CSS framework dependency.** The hardcoded class names (`sortable`, 
`step`, `error`, etc.) are semantic/functional names. They do not correspond to 
Bootstrap, Tailwind, or any other CSS framework.
   - **8 of 14 classes are not overridable.** The `paginate` and 
`sortableColumn` tags in `UrlMappingTagLib` are the primary concern, with 7 
non-overridable classes between them. Users must target these specific class 
names in their stylesheets.
   - **Most FormFieldsTagLib and RenderTagLib defaults can be replaced** via 
tag attributes.
   - **`CustomTagLib.groovy`** in `grails-test-examples/` contains 
Bootstrap-like patterns (`panel`, `alert`, `badge`, `progress-bar`) but is a 
test fixture, not part of the shipped framework.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to