Skip to content

Hash name length #21

@rosskevin

Description

@rosskevin

The hashes are quite long for class names and can really add up when inspecting elements to figure out adjustments.

For example - checkout the length of the layout (granted I have specified a lot of props):

<div class="Layout-typeContainer-3240965036 Layout-direction-xs-column-3537327873 Layout-align-xs-center-1698959009 Layout-justify-xs-space-between-103446747 ui-Layout-Container-root-2335400088 ui-person-ViewContact-media-1692710983">
    <div class="Layout-typeItem-565831246 Layout-grid-xs-800592039">
        <div class="ui-Icon-Gravatar-div-259243726"><i class="material-icons ui-Icon-icon-370879474" title="Bob Kelso">person</i>
        </div>
    </div>
    <h2 class="Text-text-233331062 Text-display1-1862278092 Text-colorInherit-1808780954 ui-person-ViewContact-name-2999585750">
        Bob Kelso</h2>
</div>

Instead of generating hashes, how about keeping a global key map based on the prefix and just incrementing the number as needed e.g. Layout-typeContainer-1 and Layout-typeContainer-2?

As I understand it, we already must ensure that our prefix is unique otherwise we will overwrite other styles, or has this changed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions