Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with the less based style.min.css #3012

Closed
damianavila opened this issue Mar 10, 2013 · 16 comments
Closed

Problems with the less based style.min.css #3012

damianavila opened this issue Mar 10, 2013 · 16 comments

Comments

@damianavila
Copy link
Member

Using reveal ipython powered slideshows, if I want to get a pdf, I have problems with the following line in style.min.css:

@media print{*{text-shadow:none !important;color:#000 !important;background:transparent !important;box-shadow:none !important;} a,a:visited{text-decoration:underline;} a[href]:after{content:" (" attr(href) ")";} abbr[title]:after{content:" (" attr(title) ")";} .ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:"";} pre,blockquote{border:1px solid #999;page-break-inside:avoid;} thead{display:table-header-group;} tr,img{page-break-inside:avoid;} img{max-width:100% !important;} @page {margin:0.5cm;}p,h2,h3{orphans:3;widows:3;} h2,h3{page-break-after:avoid;}}.clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";line-height:0;}

link to the code:

In particular with this one:
color:#000 !important;
because it is making all the code black, losing all the pigment coloring...
and because is marked as !important I can not overwriting later with css.

It is necessary to get this color property to black? I don't think so... ;-)

Cheers.

Damián.

ping @Carreau because you work with this style ;-)

@Carreau
Copy link
Member

Carreau commented Mar 11, 2013

Can you find the .less file in which it is defined?
Le 11 mars 2013 00:29, "Damián Avila" notifications@github.com a écrit :

Using reveal ipython powered slideshows, if I want to get a pdf, I have
problems with the following line in style.min.css:

@media print{_{text-shadow:none !important;color:#000 !important;background:transparent !important;box-shadow:none !important;} a,a:visited{text-decoration:underline;} a[href]:after{content:" (" attr(href) ")";} abbr[title]:after{content:" (" attr(title) ")";} .ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:"";} pre,blockquote{border:1px solid #999;page-break-inside:avoid;} thead{display:table-header-group;} tr,img{page-break-inside:avoid;} img{max-width:100% !important;} @page {margin:0.5cm;}p,h2,h3{orphans:3;widows:3;} h2,h3{page-break-after:avoid;}}.clearfix{_zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";line-height:0;}

linkhttps://github.com/ipython/ipython/blob/master/IPython/frontend/html/notebook/static/css/style.min.css#L20to the code:

In particular with this one:
color:#000 !important;
because it is making all the code black, losing all the pigment coloring...
and because is marked as !important I can not overwriting later with css.

It is necessary to get this color property to black? I don't think so...
;-)

Cheers.

Damián.

ping @Carreau https://github.com/Carreau because you work with this
style ;-)


Reply to this email directly or view it on GitHubhttps://github.com//issues/3012
.

@Carreau
Copy link
Member

Carreau commented Mar 11, 2013

will be fixed in bootstrap v3.

@damianavila
Copy link
Member Author

Thanks for the info.

@ellisonbg
Copy link
Member

Can we close this as it will be fixed upstream in bootstrap?

@damianavila
Copy link
Member Author

OK!

@damianavila
Copy link
Member Author

I will reopen this one because details a current issue to be solved after the upgrading to boopstrap v3... but we need to modified the new print less file accordingly to fix it (it is not automatic fix)
If somebody can change the milestone to 3.0 it will be greatly appreciate it. Thanks

@damianavila damianavila reopened this Feb 5, 2014
@minrk minrk modified the milestones: 3.0, 1.0 Feb 6, 2014
@minrk
Copy link
Member

minrk commented Nov 14, 2014

@damianavila what needs to be done here?

@damianavila
Copy link
Member Author

IIRC, we have to get rid of color:#000 !important from the print stylesheet, so the code it colored properly... but let me check a little bit because I don't know how bootstrap handle this now... I will take a stab on this tomorrow...

@damianavila
Copy link
Member Author

OK, the problem is that the print stylesheet in bootstrap have these lines: https://github.com/ipython/ipython-components/blob/master/bootstrap/less/print.less#L8-L16

So, because of the !important we don't have too much options?
I can directly modify the stylesheet in the ipython-components, but then we have to make the patch any time we update bootstrap... does anyone know a way to avoid the use of the complete print stylesheet? if there is way we could ship our own print stylesheets without this bizarre !importants

@damianavila
Copy link
Member Author

pinging @Carreau and @jdfreder who recently submitted #7147 and maybe knows some tricks...

@jdfreder
Copy link
Member

We could reimplement https://github.com/ipython/ipython-components/blob/7e04311dce773c145aa94d253ba0ec70f81fa59c/bootstrap/less/bootstrap.less#L7 in https://github.com/ipython/ipython/blob/master/IPython/html/static/style/style.less#L6 , only to import what we actually use. We could then remove the reference to Bootstrap.less . Other than that, I'm not sure we can make our selectors more specific without !important.

@Carreau
Copy link
Member

Carreau commented Dec 15, 2014

We can overwrite the specific key that implement !important I guess. Is it fixed on last bootstrap ?
We can send a fix uptsream that remove the !important and wrap the conterpart in media screen?

@damianavila
Copy link
Member Author

yes, I guess we can send a fix upstream (not fixed in master)... seem the cleanest solution IMHO

@ellisonbg
Copy link
Member

@damianavila should we keep this targeted to 3.0? Any update on this issue?

@ellisonbg ellisonbg added the bug label Jan 11, 2015
@damianavila
Copy link
Member Author

Let target to 4.0... I will submit the request upstream... if I get a quick answer, we can do the changes before 3.0 but I don't know if it is a realistic timeframe, so better change it to 4.0

@ellisonbg ellisonbg modified the milestones: 4.0, 3.0 Jan 12, 2015
@Carreau Carreau modified the milestones: 4.0, 5.0 Jun 12, 2015
@Carreau Carreau modified the milestones: not ipython, 5.0 Apr 30, 2016
@Carreau
Copy link
Member

Carreau commented Jul 20, 2017

Closing as this issue is not in IPython itself and if still problematic and relevant should be opened on the right repository. This will allow to keep the number of opened issue on the IPython repo under control.

Feel free to keep commenting or reopen if necessary.

Thanks.

@Carreau Carreau closed this as completed Jul 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants