mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
Merge pull request #938 from hgiesel/editorflex
Small refactor of topbar buttons
This commit is contained in:
commit
b16f6cbcce
2 changed files with 25 additions and 10 deletions
|
@ -34,12 +34,28 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
#topbutsOuter {
|
#topbutsOuter {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.topbuts > * {
|
||||||
|
margin: 0 1px;
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.topbut {
|
.topbut {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
|
@ -59,6 +75,7 @@ body {
|
||||||
|
|
||||||
button.linkb {
|
button.linkb {
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
|
margin-bottom: -3px;
|
||||||
border: 0;
|
border: 0;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
padding: 0px 2px;
|
padding: 0px 2px;
|
||||||
|
@ -79,12 +96,12 @@ button:focus {
|
||||||
}
|
}
|
||||||
|
|
||||||
button.highlighted {
|
button.highlighted {
|
||||||
.nightMode #topbutsleft & {
|
|
||||||
background: linear-gradient(0deg, #333333 0%, #434343 100%);
|
|
||||||
}
|
|
||||||
|
|
||||||
#topbutsleft & {
|
#topbutsleft & {
|
||||||
background-color: lightgrey;
|
background-color: lightgrey;
|
||||||
|
|
||||||
|
.nightMode & {
|
||||||
|
background: linear-gradient(0deg, #333333 0%, #434343 100%);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#topbutsright & {
|
#topbutsright & {
|
||||||
|
|
|
@ -76,10 +76,8 @@ html { background: %s; }
|
||||||
</style>
|
</style>
|
||||||
<div>
|
<div>
|
||||||
<div id="topbutsOuter">
|
<div id="topbutsOuter">
|
||||||
<div id="topbuts" class="clearfix">
|
|
||||||
%s
|
%s
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div id="fields">
|
<div id="fields">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -206,10 +204,10 @@ class Editor:
|
||||||
righttopbtns = runFilter("setupEditorButtons", righttopbtns, self)
|
righttopbtns = runFilter("setupEditorButtons", righttopbtns, self)
|
||||||
|
|
||||||
topbuts = """
|
topbuts = """
|
||||||
<div id="topbutsleft" style="float:left;">
|
<div id="topbutsleft" class="topbuts">
|
||||||
%(leftbts)s
|
%(leftbts)s
|
||||||
</div>
|
</div>
|
||||||
<div id="topbutsright" style="float:right;">
|
<div id="topbutsright" class="topbuts">
|
||||||
%(rightbts)s
|
%(rightbts)s
|
||||||
</div>
|
</div>
|
||||||
""" % dict(
|
""" % dict(
|
||||||
|
|
Loading…
Reference in a new issue