MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Force a CSS Refresh? (https://www.mobileread.com/forums/showthread.php?t=204695)

zephyrmays 02-02-2013 08:16 PM

Force a CSS Refresh?
 
How do I force a refresh of the html files when I've made a change in the CSS styling?

Apologies if I"m missing something obvious.

Btw version 0.6 is a huge improvement over version I used 15 months ago... I'd all but given up my desire to create an ebook... well done.

JSWolf 02-02-2013 08:21 PM

Just close the tab for that XML you want to update. Then double click and you'll see it as you should.

zephyrmays 02-02-2013 08:55 PM

Thanks for the quick reply; however, closing and reopening the html file did not seem to refresh the properties defined in my stylesheet.

There isn't a keyboard command for this?

mrmikel 02-02-2013 09:15 PM

I usually see the results right away, as I return after altering the css. There may be a bracket missing, semicolon instead of colon. Practically anything wrong can invalidate the following css.

Use Tools to check the css, to make sure.

zephyrmays 02-02-2013 09:19 PM

When I select

Tools -> Validate Stylesheets with W3C

nothing happens... does that mean it passed?
Again, am I missing something?

I appreciate all the replies on a Saturday evening!

zephyrmays 02-02-2013 09:41 PM

To shed a bit of light one what exactly I'm doing:

I am adjusting the settings of the tables in my epub using the style sheet:

Code:

table {
margin-left:auto;
margin-right:auto;
width: 70%;
border-collapse: collapse;
}

and have found that the changes only appear when I close and reopen the Sigil program. (the above worked beautifully for my needs, finally)

Turtle91 02-02-2013 09:42 PM

It normally automatically refreshes for me as well.

I'm just guessing here...
If you select all of your html files...right click on one and select "Link Stylesheets..." then make sure that the stylesheet you want has a check in the box.

Cheers,

zephyrmays 02-02-2013 09:55 PM

yes, they are for sure linked, and changes I make to the styleshhet that effect tables are only rendered when I close and open the program.

Code:

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <link href="1H-60T-1_files/filelist.xml" rel="File-List" />
  <link href="1H-60T-1_files/themedata.xml" rel="themeData" />

  <title></title>
  <link href="../Styles/Formatting%20Styles.css" rel="stylesheet" type="text/css" />
</head>

<body>
  <h1 id="sigil_toc_id_25">SECTION 1 Part A - SYSTEMS</h1>


mrmikel 02-02-2013 09:59 PM

I'd get rid of that space in the file name. It may be causing you trouble-%20

zephyrmays 02-02-2013 10:01 PM

And more info:

In code view, when I add the class to the <p> tag the change shows up immediately when switching to book view. However, a subsequent change to the stylesheet doesn't render until I close and re-open the program.

Doesn't seem to matter if the object is text or table.
Code:

  <p class="note">This is sample text for a NOTE.</p>

zephyrmays 02-02-2013 10:10 PM

Quote:

Originally Posted by mrmikel (Post 2408993)
I'd get rid of that space in the file name. It may be causing you trouble-%20

You hit it on the head! Rookie mistake, I should've known better. Deleting that space seems to have fixed it. All changes in stylesheet reflecting in html files just by switching between the tabs; no save, tab close or shutdown required!

Many thanks for looking at my posts - happy Super Sunday!

Regards,
Zephyr

theducks 02-02-2013 10:49 PM

Quote:

Originally Posted by zephyrmays (Post 2408959)
When I select

Tools -> Validate Stylesheets with W3C

nothing happens... does that mean it passed?
Again, am I missing something?

I appreciate all the replies on a Saturday evening!

No, something is wrong. Your browser should open, you should see an initial message (instructions on what to do if it does not proceed), the you are at W3C with a Green or Red banner
:smack: Go for Green :D

zephyrmays 02-02-2013 10:54 PM

Quote:

Originally Posted by theducks (Post 2409035)
No, something is wrong. Your browser should open, you should see an initial message (instructions on what to do if it does not proceed), the you are at W3C with a Green or Red banner
:smack: Go for Green :D

Any ideas on fixing this? I looked thru the Preferences and didn't see anything for setting default browser (I primarily use safari on 10.8.2, but have Firefox and Chrome installed as well...)

Turtle91 02-02-2013 11:50 PM

From what I can tell Sigil creates an html page and sends that file to the vaildator....at least the address shows:
Quote:

file:///C:/Users/Dion/AppData/Local/Temp/sigil_246ecfed-e857-4291-a37c-93458cbad248.html
when I click on Validate stylesheets.

I have never set a default web browser within Sigil - and don't see a location that would let you set one.

So, I would think that it is just trying to open an html page and relying on your system defaults to open a browser.

You may need to go into your OS settings and (re)select a default browser. (Right click on an html file, select open with, and select default when using windows)

The next thing I would try is making sure you clean out any addons/plugins/bars - I've had those cause cause conflicts in the past.

Cheers!

Sabardeyn 02-03-2013 12:59 PM

Wild guess here...

If you're on Windows (XP or more recent version), perhaps this is a Limited User Account (LUA) / permissions related problem? Or it could be a firewall issue - with Sigil not being authorized to send data to your browser.


All times are GMT -4. The time now is 06:09 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.