Assuming that the parent has width 100%, it is wanted to make child 1 with width 25%, child 2 with width 75%.
Those two children are some custom components that cannot have their own class so the changes must be done in the parent class.
What I've tried:
.parent {
display: flex;
}
.parent:first-child {
width: 25%;
background: #ddd;
}
<div class="parent">
<div>child 1</div>
<div>child 2</div>
</div>
This one makes both of them having 25% of the parent in total.
Any ideas?