Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
using txp tags in css
hello!
i want to know, how i can put for example article tag with css code to my css in txp section“styles” ?
Last edited by Katalonian (2010-07-04 17:11:42)
<txp:txp_me />
Offline
#2 2010-07-04 17:52:11
- RalphFFM
- Member
- Registered: 2008-10-05
- Posts: 40
Offline
#3 2010-07-04 18:03:25
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: using txp tags in css
You can’t use txp tags in the stylesheet, but I think it’s possible in inline styles. I don’t know what you want to do, but usually it can be achieved with something like <body id="<txp:section />">
on the page, <div class="<txp:category1 />">
in the article form, and so on.
Offline
Re: using txp tags in css
i tried, it’s dont work.
i need some other way how i can to use txp tags in css.
No, i don’t thing that css processors can help me.
<txp:txp_me />
Offline
Re: using txp tags in css
Els
Yes, i know that i can use inline.
but i’m interested in separate css
<txp:txp_me />
Offline
#6 2010-07-04 18:07:11
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: using txp tags in css
How would you want to use it?
Offline
#7 2010-07-04 18:10:27
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: using txp tags in css
Found a plugin, but it’s old and I don’t know if it still works.
Offline
Re: using txp tags in css
Els wrote:
How would you want to use it?
e.g.
css <txp:article form=“style”/>
form=“style”
#slider<txp:custom_field name=“slider”/> {
position:relative;
margin:30px 30px 60px 30px;
background:#202834 url(images/loading.gif) no-repeat 50% 50%;
-moz-box-shadow:0px 0px 10px #333;
-webkit-box-shadow:0px 0px 10px #333;
box-shadow:0px 0px 10px #333;
}
Last edited by Katalonian (2010-07-04 18:14:21)
<txp:txp_me />
Offline
#9 2010-07-04 18:59:46
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,315
Re: using txp tags in css
Never tried but I think rah_css_parse should just do what it says. Stef’s smd_style also parses tags in stylesheets but has a much longer blade to watch out for ;)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#10 2010-07-04 23:16:49
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,477
Re: using txp tags in css
A curious question: Which TXP-tag can cause what in a CSS declaration? I can not guess the meaning of this approach. It would be interesting to know more about the real context.
Offline
Re: using txp tags in css
Els wrote:
Found a plugin, but it’s old and I don’t know if it still works.
uli wrote:
Never tried but I think rah_css_parse should just do what it says.
Yep. Rah_css_parse does the same thing as ako_cssParse, with the expectation that rah_css_parse, of course, uses different code and supports r3300 and newer. Rah_css_parse really is adobted ako_cssParse where the features go.
See here: Feature ideas / base64 encoding of css what is going to happen when 4.3.0 comes out and which might replace which plugin.
Last edited by Gocom (2010-07-05 01:06:32)
Offline
Re: using txp tags in css
I’ve been trying to think of ways this would be useful to me …
… I could detect the screen resolution of the site visitor, and then call a form in which I could calculate appropriate height and width variables for container and column <div>s.
Variables could also be assigned values of appropriate background image addresses also dependent on screen resolution.
Or I could randomise bg images this way.
Of course I could do this using txp in a form and lots of different css files, but this method would save having lots of conditional statements in my code and duplicate <div>s in my css.
I’ve been wanting to make my site look good on all resolutions … especially for mobile devices, this way seems quite elegant and versatile.
Last edited by geoff777 (2010-07-05 08:43:47)
There are 10 types of people in the world: those who understand binary, and those who don’t.
Offline