Skip to content

Commit

Permalink
Merge pull request #1007 from UC-Davis-molecular-computing/999-right-…
Browse files Browse the repository at this point in the history
…justify-fields-in-dialogs

Fixed #999 - Right Justified Right Fields in Dialogs with Inputs
  • Loading branch information
beanbeanjuice authored Nov 7, 2024
2 parents af47af7 + 23ad67e commit 7db2cf0
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions web/scadnano-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,34 @@ label + select {

.dialog-form-item {
align-self: flex-start;

/*float: left;*/
/*display: block;*/
}

/* Only modify the width of the dialog form items that contain these specific classes. */
.dialog-form-item:has(label > input[type="number"]),
.dialog-form-item:has(label > input[type="text"]),
.dialog-form-item:has(div > .radio-left) {
width: 100%;
}

/* Only apply to labels/divs that contain their specified elements. */
.dialog-form-item label:has(> input[type="number"]),
.dialog-form-item label:has(> input[type="text"]),
.dialog-form-item div:has(> .radio-left) {
display: flex;
gap: 10px;
align-items: center; /* Align items vertically */
}

/* Only affect specific inputs/classes that are part of the dialog form item. */
.dialog-form-item input[type="number"],
.dialog-form-item input[type="text"],
.dialog-form-item .radio-left {
margin-left: auto; /* Force label input toward the right. */
}

.dialog-button {
display: inline-block;
border-radius: 3px;
Expand Down

0 comments on commit 7db2cf0

Please sign in to comment.