Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
29cce8d2
Commit
29cce8d2
authored
Jan 05, 2015
by
Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor SnowFlat inline CSS
parent
9f925e1e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
22 deletions
+16
-22
qa-theme.php
qa-theme/SnowFlat/qa-theme.php
+16
-22
No files found.
qa-theme/SnowFlat/qa-theme.php
View file @
29cce8d2
...
...
@@ -649,36 +649,30 @@ class qa_html_theme extends qa_html_theme_base
*/
private
function
head_inline_css
()
{
$css
=
'<style>'
;
$css
=
array
(
'<style>'
)
;
$css
.=
(
(
!
qa_is_logged_in
()
)
?
'.qa-nav-user{margin:0 !important;}'
:
null
);
if
(
qa_request_part
(
1
)
!==
qa_get_logged_in_handle
())
{
$css
.=
'@media (max-width: 979px){'
;
$css
.=
' body.qa-template-user.fixed, body[class^="qa-template-user-"].fixed, body[class*="qa-template-user-"].fixed {'
;
$css
.=
' padding-top: 118px !important;'
;
$css
.=
' }'
;
$css
.=
'}'
;
$css
.=
'@media (max-width: 979px){body.qa-template-users.fixed{
padding-top: 95px !important; }
if
(
!
qa_is_logged_in
())
{
$css
[]
=
'.qa-nav-user { margin: 0 !important; }'
;
}
@media (min-width: 980px){body.qa-template-users.fixed{
padding-top: 105px !important;}
}'
;
if
(
qa_request_part
(
1
)
!==
qa_get_logged_in_handle
())
{
$css
[]
=
'@media (max-width: 979px) {'
;
$css
[]
=
' body.qa-template-user.fixed, body[class*="qa-template-user-"].fixed { padding-top: 118px !important; }'
;
$css
[]
=
' body.qa-template-users.fixed { padding-top: 95px !important; }'
;
$css
[]
=
'}'
;
$css
[]
=
'@media (min-width: 980px) {'
;
$css
[]
=
' body.qa-template-users.fixed { padding-top: 105px !important;}'
;
$css
[]
=
'}'
;
}
// sidebar styles for desktop (must use server-side UA detection, not media queries)
if
(
!
qa_is_mobile_probably
())
{
$css
.=
'.qa-sidepanel {'
;
$css
.=
' width: 25%;'
;
$css
.=
' padding: 0px;'
;
$css
.=
' float: right;'
;
$css
.=
' overflow: hidden;'
;
$css
.=
' *zoom: 1;'
;
$css
.=
'}'
;
$css
[]
=
'.qa-sidepanel { width: 25%; padding: 0px; float: right; overflow: hidden; *zoom: 1; }'
;
}
$css
.=
'</style>'
;
$this
->
output
(
$css
);
$css
[]
=
'</style>'
;
$this
->
output_array
(
$css
);
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment