0

How does the box add text?

I did not find the relevant style in Lightning Design System. enter image description here

enter image description here

1
  • Maybe you could provide your code snippets? You could try slds-box_border should work similarly.
    – Damecek
    Jul 14 at 11:24
3

There is no ootb slds style that seems to do this, however, this is very basic HTML/css. You can easily achieve this by setting a negative margin to an element:

Template.html

<div>
  <h3>Title</h3>
</div>

.css

div{
    height:100px;
    width:100px;
    border: 1px solid black;
}

h3{
    width: 30px;
    margin-top:-12px;
    margin-left:5px;
    background-color : white;
}

enter image description here

3

This is standard legend tag that is used with fieldset. You can read more about it here.

Because this is standard HTML functionality you can't find any info on it in Lightning Design System

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.