Trying to retrieve the other half of an image using background position

This is the best I can do with this, all the other properties don’t go with every class.

    .wrapa,
    .wrapb,
    .wrapc,
    .wrapd,
    .wrape,
    .wrapf,
    .wrapg,
    .wraph
      {
      border-radius: 25px;
      position: relative;
    }

Is it better to have multiple classnames listed more than once, or multiple properties listed more than once?

Generally if you have more than 4 items in a comma separated list then a modular approach using class names may be better.

There is no right answer as it all depends on the code in hand, your preferences and what needs to be achieved.

You have identified three types of boxes that you are using, You could easily use 3 classes for all of those. e.g.

.box_some-descriptive-text-here{}
.box_some-different-descriptive-text-here{}
.box_some-more-descriptive-text-here{}

You could of course use:

.box1{}
.box2{}
.box3{}

But that is a little vague as to its use.

2 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.