-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Button Style on Mobile #138
Comments
Obsidian 1.4.0 API 1.0.0 mobile user In Buttons' plugin folder open On 1451 line you'll see const button = el.createEl("button", {
cls: args.class
? `${args.class} ${args.color}`
: `button-default ${args.color ? args.color : ""}`,
}); Left argument is a Was: cls: args.class
? `${args.class} ${args.color}`
: `button-default ${args.color ? args.color : ""}`, Became: cls: [
args.class
? `${args.class} ${args.color}`
: `button-default ${args.color ? args.color : ""}`,
inline ? "button-inline" : ""
] In .button-inline {
width: unset !important;
height: unset !important;
display: inline-block !important;
padding: 0 10px;
} Seems to works fine. Remember, if you have changed the plugin's |
Submit a PR |
TLDR I'm trying and failing to make button width on mobile not be the width of the device.
On Android, the inline button width defaults to note/device width (switching between portrait and landscape proves this), while on PC you can have multiple inline buttons per line. I tried applying a custom css class to the button, but that only affects the desktop rendered button. The mobile version is still the width of the note.
I realized the snippet wasn't syncing, so I created from my android device, and its affecting the height of the button, but its still page/device width.
Do you have a suggestion as to how I can change the width of the buttons on mobile? If you could point me to what to change in the code, I can do that myself, if you don't want to make an official change.
The text was updated successfully, but these errors were encountered: