Jump to content

Archived

This topic is now archived and is closed to further replies.

pondhopper

Hierarcy of CSS

Recommended Posts

pondhopper

I have pretty much finished with all but adding content to this site http://www.technoticks236.com but now have a string of questions about CSS and pagelines framework and tidying this site up before I start on the two commercial sites that I used this as a "testing ground" for.  These are the questions relating to CSS and it is this that has probably caused me more problems than anything else in developing this site.

 

1) Custom CSS

 

I have 19 custom CSS sheets in http://www.technoticks236.com/news/wp-content/pagelines how are these created and do I need to keep them all?  The stylesheet in the head of my index page and several of my key pages  http://www.technoticks236.com/wp-content/uploads/pagelines/compiled-css-1390334527.css doesn't even appear in this list of 19.

 

2) Custom CSS minified

 

It is almost impossible to edit and I assume that is because at some point during the development of the site I minified the CSS either through pagelines or through W3 cache (now deleted) or a combination of the two.  This is making it impossible to modify even once I have identified what I need to do through firebug

 

3) CSS hierarcy

 

I am trying to find somewhere on the forums or elsewhere something that will help me identify the hierarcy of CSS in pagelines.  What I really want to do is cut out everything except the pagelines style.css and a child theme style.css.  As a result I am seeing the correct change in firebug, identifying the file but the change is not showing through because there is obviously another css file higher up the hierarchy that is overriding it.  this clearly applies to the .h3 widget-title and the .hentry-pad tags in particular.

 

4) Styles embedded for redundant plugin

 

I uploaded phototonic a flickr integration plugin and decided that it was not what I wanted.  I deactivated the plugin and deleted the files, but I notice from the source code of this page at least http://www.technoticks236.com/the-daily-tick/ there is still a lot of code in there relating to phototonic both in terms of linked style sheets and style elements in the header.  Am I stuck with this.  It only seems to be on this page, but this is the main blog roll and has become very slow to load.

 

 

 

 

Share this post


Link to post
Share on other sites
Danny

HI,

 

1. Basically, PageLines Framework has a number of stylesheets i.e .less stylesheets, this includes all sections. Then they're all compiled into one dynamic stylesheet like you mentioned above. However, not sure why you have 11 custom stylesheets, are you saying you have created 11 ?

 

2 & 3. Not entirely sure what you mean by #2, there is as far as I can remember a minify option in PageLines Framework under the Advanced setting, maybe you checked that. If you're adding all your custom CSS/LESS to a child themes style.css or style.less file, then you will most likely need to use one of the PageLines overrides, I recommend you view our documentation for assistance and as to why you need to use one.

 

http://support.pagelines.me/docs/customization/custom-css/

 

4. I'm seeing no mention of phototonic in your page source, has this been resolved ?


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
pondhopper

Thanks Danny, sorry not to have acknowledged earlier.  I will take a look and get back to you.

Share this post


Link to post
Share on other sites
pondhopper

OK - so here is where I am at.  Yes, there were 19 compiled style sheets sitting in there.  It seems that whenever you update the Framework custom css it saves as a new file and keeps the archive in tact.  Removing them via FTP made no negative difference to the site at all so they are gone.  Also some conflicting css in the typography advanced section now removed.

 

Yes, minify was checked.

 

The CSS link was really helpful.  It is pretty difficult getting to stuff on framework as many of the links are now broken so I tend to give up searching around.

 

Simple Custom CSS plugin helping to simplify and has made a big difference (to my frustration levels as well as anything else).

Share this post


Link to post
Share on other sites
Danny

If you want to become a ninja in editing the default styling, what I would suggest is sign up to Code School which is free. Then do their free online course/interactive tutorial for Google Chrome Dev tools, upon completion you should be a ninja and have no issue finding the correct class name(s) and adding your own CSS. You will of course need to have some basic knowledge of CSS.

 

If you don't, you should check out TreeHouse, Code School, Codec Academy or Lynda.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
pondhopper

Thanks Danny, I'm comfortable with CSS as part of a basic HTML site.  My frustration has been with the fact that I had clearly got lots of overlapping and conflicting CSS in this site which I had iteratively added as I learned to use both wordpress and framework and we didn't take it easy in terms of site functionality either.

 

Although using firebug to identify the selectors was great; adding it to the custom code section of the framework didn't generally work.  It was inconsistent or had a lag on it (I would add it, it wouldn't work, I'd get frustrated and go to bed and ... next morning it would be there).  I am sure that having W3cache and akamai to speed it up as I was creating the site didn't help either.  All caching switched off and adding the Simple Custom CSS has made all the difference (and help from you guys of course!)

 

I will certainly check out the resources above.  OK ... on to the next! ... time to duck I'm sure far more questions coming your way.  BTW most useful plugins:

 

Simple Custom CSS

Category Order and Taxonomy Terms Order
Jetpack only for admins (a saviour)

But here is another question for you.  Having taken this time to get to understand framework is it going to be continued or am I going to HAVE to move to DMS?

Share this post


Link to post
Share on other sites
Danny

If code worked in Firebug or similar tools, but didn't work when added to your custom CSS, it is likely that you will need to prefix your code with a PageLines override such as #site or #page, for example, instead of:

 

.my-class { ...}

 

Use this:

 

#site .my-class { ... }

 

For me personally, I find working with Chromes dev tools to be superior to Firebug. In regards to cache plugins, they should be the very last thing you add to your site when you design is finalised, unless you know what you're doing. 


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
pondhopper

Yes, thanks Danny, I wish I had learned about the #site and #page prefixes earlier!  I have never needed to use the caching tools before ... but then I have not created this type of site before either.  All good stuff and helpful for the future.  Is Framework going to continue to be supported or am I going to have to move over to DMS. Useful to know before I start the next two?

Share this post


Link to post
Share on other sites
Danny

PageLines Framework will still be supported in such that it will receive maintenance & bug fixes, but is now feature frozen. If I was you I would download the free version of DMS and get yourself used to the new system.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
pondhopper

Joy! .. I suspected that would be your answer :)

Everything you've said above the same for DMS or are there some different fundamentals?  CSS Plugin, #site #page overrides ...

Share this post


Link to post
Share on other sites
James B

Hi there, the setup is the same in DMS, use the base theme or customize plugin/cc panel for css changes. Copy paste the code edits from firebug/chrome dev tools in as on the Framework. Overrides aren't needed so much as you're able to give sections specific class names in DMS via a class field inside the theme section options.

 

http://docs.pagelines.com/customize/overriding-default-css


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites

  • Similar Content

    • Michael Kummer
      By Michael Kummer+
      Hi guys!
      I have noticed that my primary sidebar becomes intermittently invisible when browsing through various blog articles on michaelkummer.com/blog.
      See:
      https://www.dropbox.com/s/z646sgoa3mfjl1j/Screenshot 2018-07-12 15.57.46.jpg?dl=0 and https://www.dropbox.com/s/vdledzzgginvwgv/Screenshot 2018-07-12 15.57.57.jpg?dl=0
      Upon refresh, the sidebar appears. I have been using the following CSS code to hide the sidebar on mobile without any issues. 
      @media only screen and (max-width: 993px) {
      /* hide sidebars */
           .plsb {
              display: none !important;
          }
      }
      I tried to add the following CSS to force the sidebar to show on screens that are wider than 994 pixels but to no avail. Any clue what could be causing this issue?
    • Michael Kummer
      By Michael Kummer+
      Hi guys!
      I am using the LESS/CSS Pagelines extension and tried to add the following code to make use of FontAwesome:
      a.c2a:before {
          content: "\f07a\00a0";
          font-family: "Font Awesome 5 Pro";
          Font-weight: 900;
          font-style: normal;
          font-weight: normal;
          text-decoration: inherit;
          padding-left: 4px;
      }
       
      The issue is that as soon as I have the CSS via the Custom Styling text box, Pagelines (or the extension) strips out the backslashes (\). As a result, I had to abandon the CSS/LESS extension and instead add all my CSS code to a separate .css file.
      Is there a fix or workaround for this?
      Thanks
      Michael
    • glyph.marketing
      By glyph.marketing+
      Hello, I am having a problem similar to that experienced by Michael Kummer here. We have pages that show this automatic scrolling issue (examples here and here) and it is sufficiently annoying that we have seen customers bounce while trying to convert. Strangely, it only happens at specific resolutions, so it can be difficult to reproduce. In general we can only consistently reproduce it on a 4k resolution with a browser width between 1517 and 1536px. 
      Thanks to Michael Kummer's help we were able to set the overflow-anchor property to none in the entire body, which fixed the issue as far as we can tell, but also obviously disabled scroll anchoring for the whole site. I tried applying it to the specific element that looked like it was being reloaded, which was the PL Meganav extension, but that was unsuccessful. 
      Can anyone help us figure out which element or ID we can apply this property to, so that we can fix the scrolling issue but not disable scroll anchoring for the entire site?
      Thank you - 
      Glyph Language Services
    • chamois_blanc
      By chamois_blanc+
      Hello,
      Shouldn't the image PL5 component be using the srcset/picture css directives to pick the correct size for an image? or it does already and I don't know how to use it? Thank you for any advice or enlightenment.
×