Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Here's a minimal but full `options.html` example page:

There are some extra classes you can use:

- `.monospace-field` for `<input>` and `<textarea>` to have a monospace font
- `.text-monospace` ideal for for `<input>` and `<textarea>` to have a monospace font

## Tips

Expand Down
21 changes: 19 additions & 2 deletions webext-base.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ body {
font: 16px/1.5 system-ui, sans-serif;
}


select,
textarea,
input:where(
Expand Down Expand Up @@ -75,7 +74,7 @@ kbd {
box-shadow: inset 0 -1px 0 #d1d5da;
}


/* Firefox-only style */
@-moz-document url-prefix('') {
@media (prefers-color-scheme: dark) {
:root {
Expand All @@ -84,6 +83,24 @@ kbd {
}
}

/* Safari-specific style */
@supports (-webkit-text-security: none) {
:root {
/* Textfields on Safari desktop are too thin, they expect a darker background */
background-color: Window;
}
}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This gray background looks good when coupled with the small font:-apple-system-body; text and a small windows, but not on full-width tabs, especially if they have extra style like for Refined GitHub.

Dropping it…

/* iOS/iPadOS-specific style */
@supports (-webkit-text-size-adjust: none) {
@media (prefers-color-scheme: dark) {
:root {
/* Safari iOS has a black background */
background-color: #1e1e1e;
}
}
}

.text-monospace,
.monospace-field {
/* Same as GitHub style for `code` */
font-family:
Expand Down