Skip to content
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

Styling closer to native Obsidian UI #13

Open
jancbeck opened this issue Dec 28, 2023 · 1 comment
Open

Styling closer to native Obsidian UI #13

jancbeck opened this issue Dec 28, 2023 · 1 comment

Comments

@jancbeck
Copy link

Hey, fantastic plugin! I wish it looked a bit more like the native UI so I made some tweaks:

obsidian.mov

Feel free to use the CSS:

#command-menu, #selection-menu .linemenu {
  font-size: 0.8em;
  -webkit-font-smoothing: antialiased;
  font-weight: 500;
  background-color: var(--color-base-20);
}

#command-menu .command-option,
#selection-menu .linemenu-option {
  padding: 6px 8px;
}
#command-menu .command-option:focus,
#selection-menu .linemenu-option:focus {
  background-color: var(--interactive-accent);
  color: var(--text-on-accent);
}
#command-menu .command-option div,
#selection-menu .linemenu-option div {
  padding: 4px;
  margin-right: 8px;
}
[commandtype="insert-heading4"] {
  border-bottom: 1px solid var(--background-modifier-border)
}
.command-option svg,
.linemenu-option svg {
  max-width: 12px;
  max-height: 12px;
}
#selection-menu .linemenu {
  transform: translateX(200px);
}
#selection-menu .selection-btn:hover {
  background-color: var(--interactive-accent);
  color: var(--text-on-accent);
}
#selection-menu .selection-btn:hover svg path {
  fill: white;
}
.selection-btn:first-child:hover::after {
  filter: brightness(0.5) invert(1);
}
/* Dropdown */
.selection-btn[commandtype="0"] {
  order: 9999;
}
/* Link */
.selection-btn[commandtype="1"] {
  order: 3;
}
/* Bold */
.selection-btn[commandtype="2"] {
  order: 1;
}
/* Strikethrough */
.selection-btn[commandtype="3"] {
  order: 0;
}
/* Italic */
.selection-btn[commandtype="4"] {
  order: 2;
}
/* Underline */
.selection-btn[commandtype="5"] {
  display: none;
}
/* Code */
.selection-btn[commandtype="6"] {
  order: 0;
}
/* Tex */
.selection-btn[commandtype="7"] {
  order: 0;
}
/* Higlight */
.selection-btn[commandtype="8"] {
  order: 0;
}
@Jambo2018
Copy link
Owner

Great,how about committing a PR?😁😁😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants