notebook.css on .sage directory is being ignored

89 views
Skip to first unread message

Fred Gruber

unread,
Jan 28, 2014, 4:22:13 PM1/28/14
to sage-s...@googlegroups.com
Hi
According to many instruction online we are suppose to be able to change the style of the notebook by changing the notebook.css on the .sage directory

I'm using sage 6.0. I set the variable DOT_SAGE to .sage and added a sample notebook.css

However, when I go to the notebook it just ignores the stylesheet.

Is this still a valid way to change the style or is it just obsolete now?

My goal is to be able to create a style sheet that will give sage a more professional look like some of the styles available in ipython, for example:

kcrisman

unread,
Jan 28, 2014, 10:25:49 PM1/28/14
to sage-s...@googlegroups.com


On Tuesday, January 28, 2014 4:22:13 PM UTC-5, Fred Gruber wrote:
Hi
According to many instruction online we are suppose to be able to change the style of the notebook by changing the notebook.css on the .sage directory

I'm using sage 6.0. I set the variable DOT_SAGE to .sage and added a sample notebook.css

However, when I go to the notebook it just ignores the stylesheet.

Hi!  If I create this file with contents

a {
color: green;
}



then the words "The Sage Notebook" are green, but nothing else.  So it may have to do with your inheritance of selectors.  Hopefully someone else can give a more detailed answer, but I hope this helps you find the right thing.  When I use the inspector in my browser it indicates that most of the rules in notebook.css (which is apparently taken up into main.css) are overridden by other, more specific rules in main.css.  So you may need to be fairly specific.  However, Firebug or Web Inspector or what have you should show you the way to what selectors to use for whatever customization you want.

- kcrisman

Fred Gruber

unread,
Jan 31, 2014, 2:34:38 PM1/31/14
to sage-s...@googlegroups.com
thanks for the insight.

If anyone have other tips they are welcome

P Purkayastha

unread,
Jan 31, 2014, 11:55:50 PM1/31/14
to sage-s...@googlegroups.com
The notebook css is quite a bit of a mess. :)

You will have to customize a lot of stuff to get the look you want. A
couple of years ago, I wanted to have smaller fonts and small header at
the top, and had to modify a lot of css elements to get what I wanted.

I have since stopped using those modifications, but attached is a
screenshot of the CSS I was using and the CSS file itself.


On 02/01/2014 03:34 AM, Fred Gruber wrote:
> thanks for the insight.
>
> If anyone have other tips they are welcome
>
> On Tuesday, January 28, 2014 10:25:49 PM UTC-5, kcrisman wrote:
>
>
>
> On Tuesday, January 28, 2014 4:22:13 PM UTC-5, Fred Gruber wrote:
>
> Hi
> According to many instruction online we are suppose to be able
> to change the style of the notebook by changing the notebook.css
> on the .sage directory
>
> I'm using sage 6.0. I set the variable DOT_SAGE to .sage and
> added a sample notebook.css
>
> However, when I go to the notebook it just ignores the stylesheet.
> <http://nbviewer.ipython.org/github/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/blob/master/Chapter1_Introduction/Chapter1_Introduction.ipynb>
>
>
> Hi! If I create this file with contents
>
> a {
> color: green;
> }
>
>
>
> then the words "The Sage Notebook" are green, but nothing else. So
> it may have to do with your inheritance of selectors. Hopefully
> someone else can give a more detailed answer, but I hope this helps
> you find the right thing. When I use the inspector in my browser it
> indicates that most of the rules in notebook.css (which is
> apparently taken up into main.css) are overridden by other, more
> specific rules in main.css. So you may need to be fairly specific.
> However, Firebug or Web Inspector or what have you should show you
> the way to what selectors to use for whatever customization you want.
>
> - kcrisman
>
> --
> You received this message because you are subscribed to the Google
> Groups "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to sage-support...@googlegroups.com.
> To post to this group, send email to sage-s...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/groups/opt_out.

notebook.css
shot-2014-02-01_12-52-28.jpg

Fred Gruber

unread,
Feb 4, 2014, 8:12:19 AM2/4/14
to sage-s...@googlegroups.com
THanks. I will try
Reply all
Reply to author
Forward
0 new messages