I think you will need this situation for any reason, for example, if you just want to select the first element after your form-group like label, you can do this technic.
With sass, you can do so:
.form
&-input, &-textarea
@apply w-full
&-group
@apply mb-4
label:first-of-type
@apply block text-gray-700 block mb-2 text-sm
Sorry if you a bit comfused with the @apply
, I'm using tailwind css for any property I need.
With css, you can do:
.form-group label:first-of-type {
property: 'value';
}
That's it, hope this help you :)
Top comments (0)