Cut down on math

This commit is contained in:
Zixaphir 2013-05-27 17:29:32 -07:00
parent 00be284919
commit 9bd241552e
6 changed files with 57 additions and 115 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -69,7 +69,8 @@ div.navLinks > a:first-of-type::after {
#boardNavDesktopFoot,
#globalMessage,
#watcher {
width: #{233 + Style.sidebarOffset.W}px !important;
#{Style.sizing}: border-box;
width: #{Style.sidebar}px !important;
#{align}: 18px !important;
}
.fixed.top #header-bar#{if _conf['Pagination'] is 'top' or _conf['Pagination'] is 'sticky top' then ',\n.pagelist' else ''} {

View File

@ -375,7 +375,7 @@ else "
top: auto;
bottom: #{if ['fixed', 'transparent fade'].contains(_conf['Post Form Style']) then (21.6 + (if Conf['Show Post Form Header'] then 1.5 else 0) + (if Conf['Post Form Decorations'] then 0.2 else 0)) else .5}em;
#{Style.sidebarLocation[1]}: auto;
#{Style.sidebarLocation[0]}: #{250 + Style.sidebarOffset.W}px
#{Style.sidebarLocation[0]}: #{Style.sidebar - 2}px
position: fixed;
#{if Style.sidebarLocation[0] is 'right' then "
#{agent}transform: rotate(90deg);
@ -1054,7 +1054,7 @@ if _conf["Filtered Backlinks"] then "
cursor: pointer;
display: block;
outline: none;
padding: 3px 7px;
padding: 3px 1em 3px 7px;
position: relative;
text-decoration: none;
white-space: nowrap;
@ -1064,18 +1064,17 @@ if _conf["Filtered Backlinks"] then "
}
.has-submenu::after {
content: "";
border-#{position}: .5em solid;
border-left: .5em solid;
border-top: .3em solid transparent;
border-bottom: .3em solid transparent;
display: inline-block;
margin: .3em;
position: absolute;
right: 3px;
right: 0;
}
.submenu {
display: none;
position: absolute;
#{position}: 100%;
top: -1px;
}
.focused .submenu {

View File

@ -157,44 +157,27 @@ Style =
else
0
# Position of submenus in relation to the post menu.
position = {
right:
{
hide:
if parseInt(_conf['Right Thread Padding'], 10) < 100
"right"
else
"left"
minimal: "right"
}[_conf["Sidebar"]] or "left"
left:
if parseInt(_conf['Right Thread Padding'], 10) < 100
"right"
else
"left"
}[_conf["Sidebar Location"]]
# Offsets various UI of the sidebar depending on the sidebar's width.
# Only really used for the board banner or right sidebar.
Style['sidebarOffset'] = if _conf['Sidebar'] is "large"
{
W: 51
H: 17
}
else
{
W: 0
H: 0
}
Style.sidebar = {
minimal: 20
hide: 2
normal: 252
large: 303
}[_conf['Sidebar']]
Style.logoOffset =
if _conf["4chan Banner"] is "at sidebar top"
83 + Style.sidebarOffset.H
if _conf["Sidebar"] is "large"
100
else
83
else
0
width = 248 + Style.sidebarOffset.W
width =
if _conf["Sidebar"] is "large"
299
else
248
Style.sidebarLocation = if _conf["Sidebar Location"] is "left"
["left", "right"]
@ -210,11 +193,6 @@ Style =
left: 0
right: 0
Style.sidebar = {
minimal: 20
hide: 2
}[_conf['Sidebar']] or (252 + Style.sidebarOffset.W)
Style.replyMargin = _conf["Post Spacing"]
css = """<%= grunt.file.read('src/General/css/layout.css') %>"""