-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conditional inclusion of scripts/css #34
Comments
You will need to split your styles into separate modules (folders) for the two scenarios. Something like this in your project:
Are detecting the user agent (e.g. iPad Safari) server side? Or do you want to use a media query (based on screen width)?
For the media query (which I think is a better approach in general), please wait for the new version of Cassette which adds support for defining the stylesheet link media attribute. I'm hoping to get this released next week. |
RIght, but this would require I put an if/then/else in every file instead of just in the Site.Master, right? |
Media queries are nice if you're only detecting size and orientation, but the UI is different when we're on the iPad. Different stylings, different font sizes, etc. We don't want the font sizes to change based on the size of the person's browser window |
If the styles are site-wide then put the if-else Reference calls in your master page. Otherwise, you may want to look into adding a extension method to
|
I'm closing this issue as I don't think Cassette itself needs to handle this. It's possible to extend and customize Cassette in your application code. |
I have shared views which are used in 2 different situations (Desktop/iPad). I have a test in my Site.Master to include the CSS for the iPad (lots of overriden styles) if the requesting user is using an iPad. Unfortunately, Cassette puts all of this stuff together, it seems.
How can I accomplish this, given that they're the same exact views?
The text was updated successfully, but these errors were encountered: