Please note that this documentation is for the most recent version of this extension. It may not be relevant for older versions. Related documentation can be found in the documentation directory of the extension.
CSS Class Usage commands
Analyze used CSS classes in RTE/HTML
Summarizes all used CSS classes found in tt_content.bodytext (except CType=html and hidden/deleted records) and prints a grouped overview per content type. This is useful when preparing RTE migrations or cleaning up unused CSS.
The command writes log messages to the file log (if configured by the extension) and dumps a structured array to the console.
Usage
vendor/bin/typo3 commands:cssclassusage
Parameters
This command has no parameters.
Output
- A PHP array listing all detected CSS classes under the key
all - For each class you will see the related
CTypeand a list oftt_content.uidvalues in which the class occurs
Example (shortened):
[
'all' => [
'btn' => [
'textmedia' => [123, 456],
'text' => [789]
],
'highlight' => [
'text' => [555]
]
]
]
Notes
- Content elements with
CType = htmlare skipped. - Only records with
hidden = 0anddeleted = 0are processed. - Execution time is written to the log.
