Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Easier to read className #156

@ojame

Description

@ojame

We've started using css-modules, so our classnames can be lengthy if the file structure is nested:

image

What's worse with a single string, is when it's long (when you have many long classes), it gets truncated. To see the full length, you click and then it becomes editable, but as a single line. Therefor you need to copy and past to an editor:

devtools

The first thought I had was to break classNames onto new lines - this is a bit tricky though, as it requires the DataView to interpret a new line character.

I did a quick implementation of converting the string to an array, to see how readable it was:

image

To me, that is far more readable than having one string. I realise this is not a solution though, because it's not a true representation of the className type. I'm not sure if this is an isolated issue, or if it warrants a decent look?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions