Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
IE-only stylesheets
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Daniel Lohse  
View profile  
 More options Nov 30 2009, 11:21 am
From: Daniel Lohse <annismcken...@googlemail.com>
Date: Mon, 30 Nov 2009 17:21:05 +0100
Local: Mon, Nov 30 2009 11:21 am
Subject: IE-only stylesheets
So, I have the layout thing working.

But there's one problem: my IE-only stylesheet is not wrapped in conditional comments, something that works with symfony > 1.2

I have this in my view.yml in apps/front/config/view.yml:

default:
  http_metas:
    content-type: text/html

  metas:

  stylesheets:
    - layout
    - main
    - markdown
    - navigation
    - styles
    -
      print: { media: print }
    -
      ie_custom:
        condition: lte IE 7

  javascripts:
    - front

  has_layout:     true
  layout:         layout

This works because I deployed it a few days ago in the non-CMS version of the website.

Any thoughts?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ornicar  
View profile  
 More options Dec 1 2009, 6:28 am
From: ornicar <thibault.duples...@gmail.com>
Date: Tue, 1 Dec 2009 03:28:47 -0800 (PST)
Local: Tues, Dec 1 2009 6:28 am
Subject: Re: IE-only stylesheets
OK, there is another way to do it with Diem.

To include an ie special stylesheet, create a web/theme/css/browser
directory. The inside it, create the files you need :
ie6.css
ie7.css
ie8.css

They will be included automatically with conditionnal comments.

*as a sidenote* : I realize that Diem has too many special way to do
things. In this example, as all stylesheets are compressed and sent
into one file to the browser, I had to find another way to include
browser specific stylesheets. But nevertheless, it should not require
the symfony dev to use another way to do it. We should keep the
symfony view.yml syntax, and the Diem features. #TODO

On Nov 30, 5:21 pm, Daniel Lohse <annismcken...@googlemail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel Lohse  
View profile  
 More options Dec 1 2009, 6:55 am
From: Daniel Lohse <annismcken...@googlemail.com>
Date: Tue, 1 Dec 2009 12:55:21 +0100
Local: Tues, Dec 1 2009 6:55 am
Subject: Re: [diem-users] Re: IE-only stylesheets
Well, there are always other ways to do things and this is not so bad.

In my own projects I have to *manually* compress all the stylesheets so I prefer Diem doing that automatically for me.

What I don't get is the following. When I do it the symfony way, I can do: "lte IE 7". How do I do that with your way? ;-)
For now I duplicated the file and have ie6.css and ie7.css but it's not that elegant.

Daniel

On 2009-12-01, at 1/December, 12:28 PM, ornicar wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel Lohse  
View profile  
 More options Dec 1 2009, 7:08 am
From: Daniel Lohse <annismcken...@googlemail.com>
Date: Tue, 1 Dec 2009 13:08:21 +0100
Local: Tues, Dec 1 2009 7:08 am
Subject: Re: [diem-users] Re: IE-only stylesheets
Hmm, I don't seem to get it to work. I created the "browser" directory inside web/theme/css/
and moved the ie6.css & ie7.css into it.

What then? I cleared the cache, rebuilt the project, no luck. I even added ie6 and ie7 into the view.yml (without any parameters).
They don't show up in the source code. :(

Daniel

On 2009-12-01, at 1/December, 12:28 PM, ornicar wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
thibault  
View profile  
 More options Dec 1 2009, 7:23 am
From: thibault <thibault.duples...@gmail.com>
Date: Tue, 1 Dec 2009 13:23:24 +0100
Local: Tues, Dec 1 2009 7:23 am
Subject: Re: [diem-users] Re: IE-only stylesheets
Sorry, I were wrong. It's

msie6.css
msie7.css
msie8.css

( you can see it in dmFrontLayoutHelper.php l.31 )

2009/12/1 Daniel Lohse <annismcken...@googlemail.com>:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel Lohse  
View profile  
 More options Dec 1 2009, 7:33 am
From: Daniel Lohse <annismcken...@googlemail.com>
Date: Tue, 1 Dec 2009 13:33:19 +0100
Local: Tues, Dec 1 2009 7:33 am
Subject: Re: [diem-users] Re: IE-only stylesheets
Okay, it's working now. :) Thanks!

But still, this will never be possible with the current system: <!--[if lte IE 7]>...<![endif]-->

:(

Daniel

On 2009-12-01, at 1/December, 1:23 PM, thibault wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
thibault  
View profile  
 More options Dec 1 2009, 7:46 am
From: thibault <thibault.duples...@gmail.com>
Date: Tue, 1 Dec 2009 13:46:11 +0100
Local: Tues, Dec 1 2009 7:46 am
Subject: Re: [diem-users] Re: IE-only stylesheets
For now Diem doesn't handle this case. It probably will later.

But what Diem does not yet, you can do yourself right now.

You can replace the front layout_helper service and override its
renderBrowserStylesheets method.

In apps/front/config/dm/services.yml :

parameters:
  layout_helper.class:        myFrontLayoutHelper // change the
service class name

Then create apps/front/lib/myFrontLayoutHelper.php :

class myFrontLayoutHelper extends dmFrontLayoutHelper
{

  public function renderBrowserStylesheets()
  {
    $html = parent::renderBrowserStylesheets();

    // add your own stuff to $html;

    return $html;
  }

It's just an example to show how to extend Diem. But I agree this
feature may be integrated to Diem core.

2009/12/1 Daniel Lohse <annismcken...@googlemail.com>:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel Lohse  
View profile  
 More options Dec 1 2009, 7:54 am
From: Daniel Lohse <annismcken...@googlemail.com>
Date: Tue, 1 Dec 2009 13:54:11 +0100
Local: Tues, Dec 1 2009 7:54 am
Subject: Re: [diem-users] Re: IE-only stylesheets
Ha, dependency injection hard at work there! Thanks! I really have to get used to this (new) power. :)

Daniel

On 2009-12-01, at 1/December, 1:46 PM, thibault wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ornicar  
View profile  
 More options Dec 1 2009, 1:32 pm
From: ornicar <thibault.duples...@gmail.com>
Date: Tue, 1 Dec 2009 10:32:33 -0800 (PST)
Local: Tues, Dec 1 2009 1:32 pm
Subject: Re: IE-only stylesheets
Now ( latest svn version ) the symfony way to include browser specific
stylesheet works with Diem.

I removed automatic inclusion of the stylesheets in the browser dir.

On Dec 1, 1:54 pm, Daniel Lohse <annismcken...@googlemail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »