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, #boardNavDesktopFoot,
#globalMessage, #globalMessage,
#watcher { #watcher {
width: #{233 + Style.sidebarOffset.W}px !important; #{Style.sizing}: border-box;
width: #{Style.sidebar}px !important;
#{align}: 18px !important; #{align}: 18px !important;
} }
.fixed.top #header-bar#{if _conf['Pagination'] is 'top' or _conf['Pagination'] is 'sticky top' then ',\n.pagelist' else ''} { .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; 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; 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[1]}: auto;
#{Style.sidebarLocation[0]}: #{250 + Style.sidebarOffset.W}px #{Style.sidebarLocation[0]}: #{Style.sidebar - 2}px
position: fixed; position: fixed;
#{if Style.sidebarLocation[0] is 'right' then " #{if Style.sidebarLocation[0] is 'right' then "
#{agent}transform: rotate(90deg); #{agent}transform: rotate(90deg);
@ -1054,7 +1054,7 @@ if _conf["Filtered Backlinks"] then "
cursor: pointer; cursor: pointer;
display: block; display: block;
outline: none; outline: none;
padding: 3px 7px; padding: 3px 1em 3px 7px;
position: relative; position: relative;
text-decoration: none; text-decoration: none;
white-space: nowrap; white-space: nowrap;
@ -1064,18 +1064,17 @@ if _conf["Filtered Backlinks"] then "
} }
.has-submenu::after { .has-submenu::after {
content: ""; content: "";
border-#{position}: .5em solid; border-left: .5em solid;
border-top: .3em solid transparent; border-top: .3em solid transparent;
border-bottom: .3em solid transparent; border-bottom: .3em solid transparent;
display: inline-block; display: inline-block;
margin: .3em; margin: .3em;
position: absolute; position: absolute;
right: 3px; right: 0;
} }
.submenu { .submenu {
display: none; display: none;
position: absolute; position: absolute;
#{position}: 100%;
top: -1px; top: -1px;
} }
.focused .submenu { .focused .submenu {

View File

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