Calgarypuck Forums - The Unofficial Calgary Flames Fan Community
Old 12-03-2017, 05:40 PM   #1
photon
The new goggles also do nothing.
 
photon's Avatar
 
Join Date: Oct 2001
Location: Calgary
Exp:
Default What does %% mean in a CSS?

If in a CSS file I see:

Code:
background: url(%%whatever%%)
What the heck does that mean??
__________________
Uncertainty is an uncomfortable position.
But certainty is an absurd one.
photon is offline   Reply With Quote
Old 12-03-2017, 05:58 PM   #2
zamler
Lifetime Suspension
 
Join Date: Feb 2008
Exp:
Default

Whatever is the placeholder for the actual image name. Meaning "whatever" image you are using. Here's an actual example, keep in mind there are many ways to use the background property.
background:#fbfbfb url(background.png) repeat-x;
In this example the background colour and image is set, and it will only repeat on the x axis. The background colour (#fbfbfb) will fill the entire area of the object the css property is acting on.
zamler is offline   Reply With Quote
The Following User Says Thank You to zamler For This Useful Post:
Old 12-03-2017, 06:04 PM   #3
photon
The new goggles also do nothing.
 
photon's Avatar
 
Join Date: Oct 2001
Location: Calgary
Exp:
Default

Placeholder, you mean that 'whatever' has to be defined elsewhere for %%whatever%% to become an actual URL? or does it just mean 'whatever' will be found in the same place that the CSS stylesheet itself is found?
__________________
Uncertainty is an uncomfortable position.
But certainty is an absurd one.
photon is offline   Reply With Quote
Old 12-03-2017, 06:08 PM   #4
zamler
Lifetime Suspension
 
Join Date: Feb 2008
Exp:
Default

No whatever is a token, a way to say whatever image you happen to be using. Unless this is for a system that is doing custom parsing of CSS. Need more information.

The example I showed is actual CSS, correct syntax. What you posted is not CSS syntax.
zamler is offline   Reply With Quote
Old 12-03-2017, 06:11 PM   #5
photon
The new goggles also do nothing.
 
photon's Avatar
 
Join Date: Oct 2001
Location: Calgary
Exp:
Default

Came across it in trying to do the snow in the banner:

https://www.reddit.com/r/csshelp/com..._falling_code/

Though I guess maybe it's part of reddit's templating system rather than being part of CSS?

I know almost nothing about CSS
__________________
Uncertainty is an uncomfortable position.
But certainty is an absurd one.
photon is offline   Reply With Quote
Old 12-03-2017, 06:29 PM   #6
zamler
Lifetime Suspension
 
Join Date: Feb 2008
Exp:
Default

It's been awhile since I worked with CSS stuff, looks like that is a method I am not familiar with. I would just copy the example and see what happens. Of if you post the CSS I can give it a test.

edit - best ignore what I said about it being a placeholder that is probably not the case.
zamler is offline   Reply With Quote
Old 12-03-2017, 07:04 PM   #7
mdubz
First Line Centre
 
Join Date: Feb 2013
Location: Lethbridge
Exp:
Default

Quote:
Originally Posted by photon View Post
If in a CSS file I see:

Code:
background: url(%%whatever%%)
What the heck does that mean??
%%whatever%% is the relative or http URL reference to where the image that you’d like to use as a background is hosted.

Eg: background: url(‘images/mybackground.jpg’)
mdubz is offline   Reply With Quote
The Following User Says Thank You to mdubz For This Useful Post:
Old 12-03-2017, 09:31 PM   #8
zamler
Lifetime Suspension
 
Join Date: Feb 2008
Exp:
Default

I did a test page with that css didn't work maybe you'll have better luck.
zamler is offline   Reply With Quote
Old 12-04-2017, 07:46 AM   #9
photon
The new goggles also do nothing.
 
photon's Avatar
 
Join Date: Oct 2001
Location: Calgary
Exp:
Default

It's working on the forum page, I just used direct URLs to the images rather than the %%flake1%% notation.
__________________
Uncertainty is an uncomfortable position.
But certainty is an absurd one.
photon is offline   Reply With Quote
Old 12-04-2017, 02:53 PM   #10
dobbles
addition by subtraction
 
Join Date: Feb 2008
Location: Tulsa, OK
Exp:
Default

The only place I have seen %% used is in jsp.

Here is an example: https://jspwiki-wiki.apache.org/Wiki...e=JSPWikiStyle

Still doesn't fit the context, but if the reddit environment uses Apache JSP, it might be possible that is the reason they wrote it that way.
dobbles is offline   Reply With Quote
The Following User Says Thank You to dobbles For This Useful Post:
Old 12-04-2017, 05:06 PM   #11
zamler
Lifetime Suspension
 
Join Date: Feb 2008
Exp:
Default

That's why I thought it might be some sort of custom engine parsing the css. I made some "frozen puck" logos.





zamler is offline   Reply With Quote
The Following User Says Thank You to zamler For This Useful Post:
Old 12-05-2017, 03:38 PM   #12
ZedMan
Scoring Winger
 
Join Date: Apr 2008
Exp:
Default

So I checked and it's part of reddit's CSS postprocessing as seen in this screenshot:

ZedMan is offline   Reply With Quote
The Following User Says Thank You to ZedMan For This Useful Post:
Old 12-05-2017, 07:38 PM   #13
Mr.Coffee
damn onions
 
Mr.Coffee's Avatar
 
Join Date: Mar 2006
Exp:
Default

Crown Sliding Scale...?
Mr.Coffee is offline   Reply With Quote
Old 12-05-2017, 07:41 PM   #14
Minnie
Franchise Player
 
Minnie's Avatar
 
Join Date: Dec 2012
Location: On your last nerve...:D
Exp:
Default

Quote:
Originally Posted by Mr.Coffee View Post
Crown Sliding Scale...?
Cascading style sheets
Minnie is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 03:09 AM.

Calgary Flames
2023-24




Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Calgarypuck 2021