mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Space items by using margins instead of spaces
* also changed name of topbutton container back to topbutsOuter as it is clearer * starting with Chromium 83, `row-gap` would be better suited for this
This commit is contained in:
parent
97f8f1b89e
commit
9226d50185
2 changed files with 18 additions and 6 deletions
|
@ -33,7 +33,7 @@ body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#topbuts {
|
#topbutsOuter {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
@ -44,6 +44,18 @@ body {
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.topbuts > button {
|
||||||
|
margin: 0 1px;
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.topbut {
|
.topbut {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
|
|
|
@ -72,10 +72,10 @@ audio = (
|
||||||
_html = """
|
_html = """
|
||||||
<style>
|
<style>
|
||||||
html { background: %s; }
|
html { background: %s; }
|
||||||
#topbuts { background: %s; }
|
#topbutsOuter { background: %s; }
|
||||||
</style>
|
</style>
|
||||||
<div>
|
<div>
|
||||||
<div id="topbuts">
|
<div id="topbutsOuter">
|
||||||
%s
|
%s
|
||||||
</div>
|
</div>
|
||||||
<div id="fields">
|
<div id="fields">
|
||||||
|
@ -204,10 +204,10 @@ class Editor:
|
||||||
righttopbtns = runFilter("setupEditorButtons", righttopbtns, self)
|
righttopbtns = runFilter("setupEditorButtons", righttopbtns, self)
|
||||||
|
|
||||||
topbuts = """
|
topbuts = """
|
||||||
<div id="topbutsleft">
|
<div id="topbutsleft" class="topbuts">
|
||||||
%(leftbts)s
|
%(leftbts)s
|
||||||
</div>
|
</div>
|
||||||
<div id="topbutsright">
|
<div id="topbutsright" class="topbuts">
|
||||||
%(rightbts)s
|
%(rightbts)s
|
||||||
</div>
|
</div>
|
||||||
""" % dict(
|
""" % dict(
|
||||||
|
@ -328,7 +328,7 @@ class Editor:
|
||||||
class_ = ""
|
class_ = ""
|
||||||
if not disables:
|
if not disables:
|
||||||
class_ += " perm"
|
class_ += " perm"
|
||||||
return """ <button tabindex=-1
|
return """<button tabindex=-1
|
||||||
{id}
|
{id}
|
||||||
class="{class_}"
|
class="{class_}"
|
||||||
type="button"
|
type="button"
|
||||||
|
|
Loading…
Reference in a new issue