Topic Closed
mahotilo
93 Posts

I have a problem with setting image path in theme scss file. I cant use relative path "../Img/1.png" like early in css or less files. And, as I can see, new base for path calculation is "/data/_cache"/

Is it intentional? Or maybe I do do something wrong. I just want to set in "background: url(" image, that saved in folder Img inside my theme folder.

Also some sugestion. It will be great, if top menu line will be more responsive to small screen sizes. May be shorten text or use pictos? It will be usefull when testing site on phone screen sizes.

And TS 5.0 is great step to perfectness! Thanks!

5 years ago#9107

Josh S.
2K Posts
294K Downloads
16 Themes
18 Plugins

That's not intentional. For the TypesetterCMS.com theme, I used relative paths for images. For example, this is part of my .less file:

.gpSlideWrapper > .gpSlide{
    background:url('../wallpapers/1700-US476983-0.png');

}

which gets changed to the following by the less compiler.

.gpSlideWrapper > .gpSlide{

background: url('/themes/x_gpeasycom_spacelab/wallpapers/1700-US476983-0.png');

Can you post a snippet of your css or less?

5 years ago#9111

a2exfr
242 Posts
28.2K Downloads
2 Themes
10 Plugins

May be for scss theme  use it like this

background: url(../../themes/theme_name/img/image.jpg);

5 years ago#9112

mahotilo
93 Posts

-------------------------------------------------

to a2exfr

yes, right now I use it this way

-------------------------------------------------

to Josh S.

in TS 4.6 I use bootswatch.less from default bootswatch theme 

body{
    background: url(../img/waiter.jpg) left top no-repeat fixed #000;
}

Folder "img" is in theme folder, "bootswatch.less" is in "Bootswatch" folder inside theme folder. All work great

 

In TS 5.0 i use style.scss from default bootswatch_Scss theme (renamed to Mebel)

Folder "Img" is in theme folder, "style.scss" is in "Readable" folder inside theme folder.

This doesn't works:

.navbar {
  background: url(../Img/bg_hmn_l.png) top left no-repeat,
              url(../Img/bg_hmn_r.png) top right no-repeat,
              url(../Img/bg_hmn.png) top center repeat-x,
              none; }

 

This works, but look like workaround:

.navbar {
  background: url(../../themes/Mebel/Img/bg_hmn_l.png) top left no-repeat,
              url(../../themes/Mebel/Img/bg_hmn_r.png) top right no-repeat,
              url(../../themes/Mebel/Img/bg_hmn.png) top center repeat-x,
              none; }

 

Edited: 5 years ago#9113

Josh S.
2K Posts
294K Downloads
16 Themes
18 Plugins
Yeah, I think scss should work the same as less current works. I'll see if I can get it fixed
5 years ago#9129

Josh S.
2K Posts
294K Downloads
16 Themes
18 Plugins

mahotilo
93 Posts

Yes, it works smooth!

Thanks

5 years ago#9139

Topic Closed

 

News

elFinder 2.1.50 in Upcoming Release
12/28/2019

A new release for Typesetter is in the works with a lot of improvements including the ... Read More

Typesetter 5.1
8/12/2017

Typesetter 5.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

More News

creisi productions

Dienstleistungen von creisi productions, Luzern (Schweiz): * Konzeption, Planung und Erstellung Ihres Internet-Auftritts * Betreuung und Aktualisierung/Pflege Ihrer Website * ...

Find out more about our Provider Spotlight

Log In

  Register