Question on CSS-Styles in general

A place for users and developers of the Xataface to discuss and receive support.

Postby Markus » Wed Jul 04, 2007 8:40 am

Hello DF users, hi Steve,


I have a question on the use of CSS-Styles within DF. I read this one http://framework.weblite.ca/forum/dataface-users/134/#1 but could not find a stylesheet called ploneCustom.css. Is it meant to copy the plone.css rename it ploneCustom.css and make the changes there or should I have an imported ploneCustom.css like Joseph James Frantz suggests and use it in addition to the standard plone.css?

Also I was wondering that there are some styles (like id- and class-selectors) in the DF-Templates which I could not find in plone.css. Is this a mistake?


Are there other Stylesheets DF uses for the output of its templates? I think plone.css is the only one, isn't it? So whichj is the best way to make changes or add some custom styles to my app?

Kind regards

Markus



Markus
 
Posts: 94
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Wed Jul 04, 2007 2:10 pm

Hi Markus,

I believe that Joseph Franz's suggestion of creating a ploneCustom.css stylesheet is just a way of keeping his styles separate from the dataface styles.

If you want to put in your own styles, I suggest, creating a separate stylesheet and then including is using the custom_stylesheets slot.

e.g. You could create a file named styles.css in your application's directory with all of your styles.
then in your application delegate class you implement :

function block__custom_stylesheets(){
echo '';
}

Alternatively you could use Joseph Franz's method where you import your custom stylesheet at the end of plone.css.

i.e. you add the following to the end of plone.css:

@import "ploneCustom.css"

Then you create another file named "ploneCustom.css" with the styles that you want to have. Since ploneCustom.css comes after the styles in plone.css, your styles will override the default styles.

here are some styles (like id- and class-selectors) in the DF-Templates which I could not find in plone.css

This is not a mistake. The templates are created so as to be manipulatable by css. This means trying to place as many css selectors and ids as possible so that you can build your own stylesheets to stylize these elements. They may or may not have styles already applied to them.

Best regards
Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby Markus » Fri Jul 06, 2007 3:38 am

Hi Steve,


thank you for your informations on CSS. I feel quite well informed now on this topic.


Best regards

Markus


Markus
 
Posts: 94
Joined: Wed Dec 31, 1969 5:00 pm

Re: Question on CSS-Styles in general

Postby randy1as » Mon May 02, 2011 9:44 am

can't figure out what goes where

did this to %%08^08F^08FE976E%%Dataface_Main_Template.html.php (in templates folder of application)
around line30
<!-- Stylesheets go here -->td.intervention_close {
background-color: #FFE6E6 !important;
}

added the following to ApplicationDelegate.php in conf folder

class tables_Lifeeqpt_Life {
function css__tableRowClass(&$record){
if ( !$record->val(10)){
return 'intervention_close';
}

trying to figure out slots - custom_stylesheet

trying to change colour for all values 10 - Help.
else return '';
}
randy1as
 
Posts: 3
Joined: Sun May 01, 2011 7:39 pm

Re: Question on CSS-Styles in general

Postby shannah » Mon May 02, 2011 10:08 am

First off, you don't want to make any changes to any files in the templates_c directory. These are compiled PHP files that will be automatically deleted and replaced when changes are made to the original files.

If you want to add your own styles there are many ways to do it. One such way is described at
http://xataface.com/documentation/how-t ... avascripts
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Question on CSS-Styles in general

Postby randy1as » Mon May 02, 2011 6:06 pm

shannah wrote:First off, you don't want to make any changes to any files in the templates_c directory. These are compiled PHP files that will be automatically deleted and replaced when changes are made to the original files.

If you want to add your own styles there are many ways to do it. One such way is described at
http://xataface.com/documentation/how-t ... avascripts


Thanks for the reply
went through the posts found two methods custom_stylesheet block - not worked
second through plone.css
by inserting
td.intervention_close {
background-color: #FFE6E6 !important;
}

and following in ApplicationDelegate.php in conf folder

class tables_lifeeqpt_Name {
function css__tableRowClass(&$record){
if ( !$record->val('ANAESTHESIA UNIT ABSORBERS')){

return 'intervention_close';
}

else return "intervention_close '';
}
}

still not working - the last else return "intervention_close ''; to check if working - nothing happens. Help will be gratefully welcome
randy1as
 
Posts: 3
Joined: Sun May 01, 2011 7:39 pm

Re: Question on CSS-Styles in general

Postby shannah » Tue May 03, 2011 10:52 am

if ( !$record->val('ANAESTHESIA UNIT ABSORBERS')){


One thing is Xataface doesn't like spaces in column names.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Question on CSS-Styles in general

Postby randy1as » Tue May 03, 2011 4:50 pm

shannah wrote:
if ( !$record->val('ANAESTHESIA UNIT ABSORBERS')){


One thing is Xataface doesn't like spaces in column names.

Am I barking up the wrong tree? - thought val('ANAESTHESIA UNIT ABSORBERS') was the contents of the name field in table called lifeeqpt.
What I want is to highlight all occurrences of ANAESTHESIA UNIT ABSORBERS in the list view. will work on it. Thanks.
randy1as
 
Posts: 3
Joined: Sun May 01, 2011 7:39 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 27 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved