Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Reduce the size of a header area on a list web page and display of posts in a discussion web page.
- Copyright (c) 2016 rccharles
- All rights reserved.
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
- 1. Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- The views and conclusions contained in the software and documentation are those
- of the authors and should not be interpreted as representing official policies,
- either expressed or implied, of the Custom Styles Project.
- Implement these changes by:
- 1) running stylish
- 2) add the combined user style sheet to stylish
- https://discussions.apple.com/docs/DOC-7501
- 3) create a new style sheet in stylish.
- 4) copy these css rules to the new sheet.
- example web pages:
- https://discussions.apple.com/content?filterID=following~objecttype~objecttype[thread]
- https://discussions.apple.com/people/<userid>?view=discussions
- What is my user agent and screen size?
- http://whatsmyuseragent.com/
- iPhone
- 320px x 480px with window size 320px x 372px
- landscape 320px x 480px with window size 480px x 320px
- HTC Desire 520
- 320px x 522px with window size 320px x 448px
- landscape 527px x 320px with window size 527px x 247px
- Apple sprites
- https://discussions.apple.com/6.0.3.0453576a/themes/apple_0.7.0/img/apple-sprite.png
- Change log
- 1.5
- - Apple changed selectors for Sort By: latest activity 9Mar2017
- 1.4
- - Apple changed name of alert box. Ditch white space. Smaller font. 8Mar2017
- - Add support for moved breadcrumb via javascript. 7Mar2017
- 1.3
- - Fix bug with title positioning when Apple alert is included on the page 21Feb2017
- - Add French and German languages 24Feb2017
- - Use regexp 24Feb2017
- - Trim 5Mar2017
- - Adjust selector 5Mar2017
- - Adjust some tabs in https://discussions.apple.com/people/
- 1.2
- - vertical center sidebar
- 1.1
- - adjustments for Nov 1, 2016 ASC changes
- */
- /* ========================================###===================================== */
- /* L i s t */
- /*
- French https://communities.apple.com/fr/community/desktop_computers/imac/content
- German https://communities.apple.com/de/community/desktop_computers/imac/content
- url-prefix(https://communities.apple.com/pt/content),
- url-prefix(https://communities.apple.com/pt/community/),
- url-prefix(https://communities.apple.com/pt/people)
- */
- @-moz-document
- url-prefix(https://discussions.apple.com/content),
- url-prefix(https://discussions.apple.com/community),
- url-prefix(https://discussions.apple.com/people),
- url-prefix(https://discussionsjapan.apple.com/content),
- url-prefix(https://discussionsjapan.apple.com/community),
- url-prefix(https://discussionsjapan.apple.com/people),
- url-prefix(https://discussionskorea.apple.com/content),
- url-prefix(https://discussionskorea.apple.com/community),
- url-prefix(https://discussionskorea.apple.com/people),
- regexp("https://communities.apple.com/(de|es|fr|pt)/(community|content|people).*")
- {
- /* debug:
- background-color: yellow !important;
- */
- /* top line:
- Communities Contact support
- I guess we know by now that we are in the communities. */
- /* Top portion of the header. First two "lines" on the page.
- Second lines is:
- My Subscriptions Content People Search Post */
- div#j-header-wrap {
- margin-bottom: 2px !important;
- /*background-color: antiquewhite !important; /* */ }
- /* Ditch first line across page. */
- div#body-apple header nav#j-globalNav-bg {border-bottom: 0px !important; }
- /* Ditch Communities */
- div#body-apple header div#apple-site-title a { display: none!important; }
- /* Ditch "Content" upper left of window.
- Glad to get rid of this redundant waste of space. */
- div#jive-body header#apple-full-header { display: none!important; }
- /* Ditch "Find helpful content and discussions"
- Total waste of space. */
- header#apple-full-header h4#apple-full-subheader { display: none!important; }
- /* Ditch Box and list view icons
- Who ever uses the box view? No need. */
- div#jive-body ul#j-item-view-toggle { display: none!important; }
- /* Ditch the line under
- [All User(nnn)] [Announcements] [User Tips(nnn)] [Discussions(nnn)] */
- ul.j-content-types.js-browse-filter-toggle-set {
- border-bottom-width: 0 !important;}
- /* [Filter by personal content] check box only appears
- on your content web page. It doesn't seem to work. */
- div.j-browse-filter-row.j-content-filter span.js-browse-filter-toggle{
- display: none!important;
- /*background-color: teal !important; /* */
- }
- /* User id [My subscriptions] [Content] [People] [Search] [Post] [Lounge] */
- header#j-header div#second-row {
- padding-top: 6px !important;
- /*background-color: yellow !important;/**/
- }
- /* User id signout */
- div#second-row ul#j-satNav-wrap {
- margin-left: -40px !important;
- margin-top: -10px !important;
- /*background-color: aqua !important;/**/
- }
- /* Delete line under [all discussions]. This is a band in back of
- [All Discussions] the spans the width of the window. */
- div.j-layout.j-layout-sl form#js-browse-controls div.j-browse-filter-row.j-content-filter {
- border-bottom: 0px !important;
- /*background-color: azure !important; /* */
- }
- /* Tame alerts
- Get rid of all the wasted white space. Smaller font. 1.4 */
- div#jive-alert-global {
- margin: 10px 0 2px 15px !important;
- padding: 5px !important;
- background-color: #F2F2F2 !important;/**/
- /*background-color: azure !important; /* light, light blue */
- }
- div#jive-alert-1{
- padding: 7px !important;
- }
- div.jive-alert-title {
- font-size: 18px !important;
- }
- div.jive-alert-title span {
- font-size: 14px !important;
- }
- /* Don't place a white line across the screen.
- You would not see with Apple's white background */
- form#js-browse-controls div.j-browse-sorts.j-browse-filter-row.last-child {
- border-top-style: none !important;
- /*background-color: azure !important; /* */
- }
- /* ========================================================================== */
- /* ...... For medium and large size windows ...... */
- @media all and (min-width: 500px) {
- /* Space between first and second line of the upper header space. Second line starts
- with Signin / Signout */
- nav#j-globalNav-bg {
- height: 26px !important;
- }
- /* [All Content(nnn)] [User [Tips(nnn)] [Discussions(nnn)]
- or
- [All User(nnn)] [Announcements] [User [Tips(nnn)] [Discussions(nnn)] */
- div.j-browse-filter-row.j-rc5 {
- height: 42px !important;
- /*background-color: lightgreen !important;/**/
- }
- /* https://discussions.apple.com/people/rccharles/content?filterID=following~objecttype~objecttype%5Bdocument%5D 1.3 */
- html body.ui-desktop.jive-view-profile div.aria-container div#body-apple ul.j-content-types.js-browse-filter-toggle-set {
- margin: 30px 80px !important;
- }
- /* actual line for [All Content(nnn)] ... */
- .j-browse-filter-row > ul li {
- height: 20px !important;
- /*background-color: rosybrown !important;/**/
- }
- /* now adjust the size of the letters in this row
- Looks like ASC has javascript to move around underline :-(
- Need make only acceptable change to preserve underlining. */
- div#jive-body div.j-browse-filter-row.j-type-row.apple-custom-line-height ul li button{
- font-size: 16px !important;
- height:18px !important;
- padding-top: 0px !important;
- padding-bottom: 1px !important;
- /*background-color: lightgreen !important; /**/
- }
- /* Jive uses an hr to adjust the underlining.
- The javascripts adjusts the margin-left to move the underline.
- <div class="j-layout j-layout-sl clearfix j-contained j-contained-tabs j-browse-content j-rc5">
- <hr style="width: 86px; margin-left: 540.3px; margin-top: 54px;"
- class="underscore-selected ready"> */
- div.j-layout.j-layout-sl hr.underscore-selected.ready {
- margin-top: 21px !important;
- /*border-top: 3px dashed #8c8b8b !important;*/
- /*background-color: lightblue !important; /**/
- }
- /* Effects margin same as div#jive-body
- header then every other line */
- div#jive-body div.j-layout {
- margin-top: 5px !important;
- /*background-color: grey !important; /* */
- }
- /* for some reason when left out User [Tips drifts] downward. */
- ul.j-content-types.js-browse-filter-toggle-set li a{
- height: 18px!important;
- font-size: 16px !important;
- padding:0px !important;
- vertical-align: middle !important;
- display:inline-block;
- overflow:hidden !important;
- white-space:nowrap !important;
- /*background-color: tan !important; /**/ }
- /* [Contact Support] seen on top right */
- div#body-apple header ul#contact-support-link {
- margin-top: -6px !important;
- margin-right: -40px !important;
- /*background-color: palegoldenrod !important; /**/
- }
- /* Support Communities / Content
- Move breadcrumb to the upper left, thus avoiding the repeating of Communities and content */
- section#j-main nav#jive-breadcrumb { /* add more selectors to overwhele main css */
- position: absolute !important; /* override what in the main css */
- text-align: left !important;
- top: -68px !important; /* === if you want to run this with out the main css,
- change from -120 to -80px === */
- left: 0px !important;
- font-size: 20px !important;
- width: inherit !important; /* override what in the main css */
- /*background-color: tan !important;/**/
- }
- /* Adjust height associated with the band in back of
- [All Discussions] the spans the width of the window. */
- div.j-layout.j-layout-sl form#js-browse-controls div.j-browse-filter-row.j-content-filter {
- height: 20px !important;
- width: 180px;
- background-color: #f2f2f2 !important; /* earlier Apple grey */
- }
- /* Pagination info
- for /content pages pagination info only appears at the bottom right */
- div span.j-pagination-prevnext.full-pagination{
- margin:0 !important;
- /*background-color: pink !important; /* */ }
- /* don't know why form doesn't contain items */
- form#js-browse-controls {
- height: 80px !important;
- /*background-color: lightgreen !important;/**/
- }
- /* [All discussions] */
- select.j-browse-filter.js-browse-filter {
- padding: 0px 6px 0px 8px !important;
- height: 32px !important;
- font-size: 14px !important;
- width: 160px !important;
- text-align: left !important;
- border-color: #9b9b9b !important;
- background-color: #f2f2f2 !important;
- /*background-color: lightsalmon !important;/**/
- }
- /* [Type to filter by text] on list of discussions in a community. */
- div.j-browse-sorts.j-browse-filter-row span.j-browse-search input {
- margin-left: 20px !important;/**/
- padding: 0px 6px 0px 8px !important;
- height: 32px !important;
- font-size: 14px !important;
- width: 160px !important; /* Was 220px */
- text-align: left !important;
- border-color: #9b9b9b !important;
- background-color: #f2f2f2 !important;
- /*background-color: yellow !important;/**/
- }
- /* [Sort by: Last Activity]
- []
- []
- []
- Suspect javscript forces 32px has the height :-(
- mess with this at your own risk!
- goes with regular list
- https://discussions.apple.com/community/mac_os/mac_os_x_technologies/content 0.13 & 0.15
- */
- html body.ui-desktop.j-body-place div.aria-container div#body-apple select#j-sort.form-cell.form-dropdown,
- /* goes with my /content
- https://discussions.apple.com/content?filterID=following~objecttype~objecttype[thread] */
- body.ui-desktop.j-body-yourwork span > select#j-sort.form-cell.form-dropdown {
- border-color: #9b9b9b !important; /* grey, Apple's color */
- padding: 0px 6px 0px 8px !important;
- text-align: left !important;
- height: 32px !important;
- font-size: 14px !important;
- margin-top: 0px !important;
- margin-left: 10px !important;
- padding: 0px !important;
- width: 200px !important;
- background-color: #f2f2f2 !important;/**/
- /*color: green !important; /**/
- /*background-color: lightsalmon !important;/**/
- }
- /* browse-filter UI layout
- (All Discussions|Open Questions|Answered Questions|Discussion Threads)
- (Type to filter by text)
- (Sort by: Latest activity|Sort by: Date created|Sort by: Title)
- rule excludes .j-browse-filter-row.j-bottom-row that is container for pagination UI
- */
- .j-browse-content .j-browse-filter-row:not(.j-bottom-row) {
- display: table-cell !important;
- float: left !important;
- }
- .j-browse-content .j-content-filter {
- border-bottom: none !important;
- height: 30px !important;
- }
- #js-browse-controls div.j-browse-sorts span select option{
- border-color: #9b9b9b !important; /* grey, Apple's color */
- padding: 0px 6px 0px 28px !important;
- text-align: left !important;
- height: 22px !important;
- font-size: 12px !important;
- padding: 0px !important;
- /*background-color: yellow !important;/**/
- }
- /* [Sort by: latest activity ]
- []
- []
- []
- goes with:
- https://discussions.apple.com/people/<ASC user name>/content?filterID=following~objecttype~objecttype%5Bdocument%5D*/
- html body.ui-desktop.jive-view-profile div.aria-container div#body-apple select#j-sort.form-cell.form-dropdown {
- margin: 84px 10px 10px 20px !important; /* the old difficult to select because ASC must have used margin instead of
- margin-left: and margin-top: */
- padding: 5px 6px 5px 8px !important;
- font-size: 14px !important;
- width: 180px !important; /* Was 220px */
- /*color:red !important;/*color of text*/
- }
- /* Pulldowns for [Sort by: latest activity ]
- seletor for dropdown items*/
- select#j-sort.form-cell.form-dropdown option {
- padding: 5px 6px 5px 8px !important;
- font-size: 14px !important;
- width: 180px !important; /* Was 220px */
- /*color:blue !important;/**/
- }
- /* box for horizontal side-bar */
- div.j-colum-wrap-s div.j-column.j-column-s {
- height: 60px !important;
- /* background-color: yellow !important;/**/
- }
- /* Hover over */
- /* [All discussions] */
- select.j-browse-filter.js-browse-filter:hover,
- /* text */
- div.j-browse-sorts.j-browse-filter-row span.j-browse-search input:hover,
- /* [sort by ...] */
- #js-browse-controls #j-browse-filters #j-sort:hover {
- border-color: #42aaff !important; /* light blue */
- }
- } /* media all and (min-width: 500px) */
- } /* end of moz-document */
- /* ==========================================###===================================== */
- /* P o s t s */
- /* Disply of all posts in a discussion.
- examples:
- https://discussions.apple.com/message/30492563#message30492563
- https://discussions.apple.com/thread/7628966
- https://discussions.apple.com/discussion/create.jspa?sr=cmenu&containerType=14&containerID=2041
- Germain
- https://communities.apple.com/de/thread/1204
- */
- @-moz-document
- regexp("https://discussions.apple.com/(message|thread)/.*"),
- url-prefix(https://discussions.apple.com/update-advanced-comment.jspa),
- url-prefix(https://discussions.apple.com/discussion/create.jspa),
- regexp("https://communities.apple.com/(de|es|fr|pt)/(message|thread)/.*"),
- regexp("https://communities.apple.com/(de|es|fr|pt)/update-advanced-comment.jspa.*"),
- url-prefix(https://discussionsjapan.apple.com/thread),
- url-prefix(https://discussionsjapan.apple.com/message),
- url-prefix(https://discussionsjapan.apple.com/update-advanced-comment.jspa),
- url-prefix(https://discussionskorea.apple.com/thread),
- url-prefix(https://discussionskorea.apple.com/message),
- url-prefix(https://discussionskorea.apple.com/update-advanced-comment.jspa)
- {
- /* Communities title -- incomplete title on top left of page. So use breadcrumb trail. */
- nav div#apple-site-title {display: none !important;} /* */
- div#jive-body-intro-content h2 {
- font-size: 20px !important;
- margin-top: 14px !important;
- /*background-color: lightskyblue !important; /**/
- }
- /* no Avatar for logged in user.
- Seems to get in the way of Original Poster's avatar */
- div#second-row img {display: none !important; }
- /* ==================================== */
- /* For medium and large size windows... */
- @media all and (min-width: 500px) {
- /* Seems to be space for previously hidden Communities header */
- div.navbar-desktop-container nav#j-globalNav-bg {height: 22px !important;}
- /* [Contact support] */
- nav ul#contact-support-link {
- margin-top: -6px !important;
- margin-right: -26px !important;}
- /* [Log in] [My Subscriptions] [Content] [People] [Search] [Post [Lounge] */
- div#second-row {
- padding-top: 2px !important;
- /*background-color: lightskyblue !important; /**/ }
- /* no Avatar for logged in user.
- Seems to get in the way of Original Poster's avatar */
- div#second-row span.j-user-name {
- padding-left: 0px !important;
- margin-left: -13px !important;
- /*background-color: lightskyblue !important; /**/}
- /* [My Subscriptions] [Content] [People] [Search] [Post [Lounge] */
- div ul#menubar.sub-nav-wrap {
- margin-top: 12px !important;
- margin-right: -26px !important;}
- /* Breadcrumb trail
- Examples:
- Support Communities / Content
- Support Communities / iPad / iPad in Business and Education
- Move breadcrumb to the upper left, thus avoiding the repeating of Communities */
- /*
- section#j-main nav#jive-breadcrumb ul { /* add more selectors to overwhele main css *-
- position: absolute !important; /* override what in the main css *-
- font-size: 20px !important;
- width: inherit !important; /* override what in the main css *-
- height: 30px !important;
- /* background-color: lightblue !important; /* *-
- }
- /* Apple put out an alert on the display of posts page
- + the element on the left is immediately before the element on the right.
- Both elements must be on the same level
- */
- /* Tame alerts
- Get rid of all the wasted white space. Smaller font. 1.4 */
- div#jive-alert-global {
- margin: 10px 0 12px 15px !important;
- padding: 5px !important;
- background-color: #F2F2F2 !important;/**/
- /*background-color: pink!important; /*azure light, light blue */
- }
- div#jive-alert-1{
- padding: 7px !important;
- }
- div.jive-alert-title {
- font-size: 18px !important;
- }
- div.jive-alert-title span {
- font-size: 14px !important;
- }
- /* Most frequently we do not have an alert on the page.
- With no aler, the div#jive-body is directly after the span element.
- could also work div:not(#jive-alert-container)
- March 7th, 2017 alter container left around when there isn't a alert
- */
- section#j-main span + div#jive-body nav#jive-breadcrumb ul { /* add more selectors to overwhele main css */
- position: absolute !important; /* override what in the main css */
- font-size: 20px !important;
- width: inherit !important; /* override what in the main css */
- height: 30px !important;
- text-align: left !important;
- top: -76px !important; /* === if you want to run this with out the main css,
- change from -85 to ?? px === */
- left: -40px !important;
- /* background-color: pink !important; /* */
- }/**/
- /* Implemented javascript to move breadcrumb trail to top right.
- Needed javascript because we would not know how much space the alert took up. */
- /* Fix up the moved breadcrumbs */
- div#body-apple > nav#jive-breadcrumb {
- margin: 6px 0 0 10px!important;
- }
- div#body-apple > nav#jive-breadcrumb ul li {
- font-size: 20px !important;
- width: inherit !important; /* override what in the main css */
- height: 30px !important;
- text-align: left !important;
- display:inline-block !important; /* li items in list horizontal */
- padding-left: 0 !important;
- /*background-color: pink !important; /* */
- }
- div#body-apple > nav#jive-breadcrumb ul li:nth-child(n+2) :before {
- content: " / ";/**/
- }
- div#body-apple > nav#jive-breadcrumb ul li a{
- margin-right: 5px !important;
- font-weight: 500 !important;
- color:black !important;
- /* background-color: pink !important;/**/
- }
- /* First two lines of the header */
- div#j-header-wrap {
- margin-bottom: 10px !important;
- /* background-color: tan !important; /* */ }
- /* ASC displays the message when original poster posts from a message
- Sometime appearing article name from where the poster made the original post
- example:
- HT203995: Mail settings you might need from your email provider
- Learn about Mail settings you might need from your email provider
- */
- div div#jive-body-intro-content {
- padding-bottom: 0px !important;
- /* There is a margin tag in larger user css. To override, you need to use the margin
- tag. The margin-bottom will not work.
- To see the effect, you need to reload the page. */
- margin: -20px 40px 0px 40px !important;
- /* background-color: pink !important; /* */}
- /* Seems to be some filler area between messaage and [following].
- Seem to have to use the exact name to override.
- When in stylish editor, effects page after save, but to see chanage in debug window
- you need to reload. */
- .j-thread #body-apple .thread-container-wrapper {
- padding-bottom: 0px !important;
- margin: 0px 40px !important;
- /* background-color: grey !important; */}
- /* [Follow]. This is the encompassing area. It's the width of the window [mostly].*/
- header.js-original-header.apple-overflow-hidden {
- padding-top: 0px !important;
- margin-top: 0px !important;
- /*background-color: grey !important; /**/
- }
- /* [Follow]
- just the area of Follow [pulldown].
- reduces the space between these items.Follow [pulldown], and first post. */
- div ul.apple-social-actions-toolbar {
- margin-top: -20px !important;
- } /* */
- } /* media all and (min-width: 500px) */
- } /* end of moz-document */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement