MVC 3,CSS,剃刀和Visual Studio 2010 [英] MVC 3, CSS, Razor and Visual Studio 2010

查看:167
本文介绍了MVC 3,CSS,剃刀和Visual Studio 2010的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你们如何管理MVC 3项目的所有CSS样式?即使在我安装了SP1的Visual Studio 2010中我发现,CSS样式经理仍然不能识别从布局视图文件的样式表的链接。

How do you guys manage all css styles in MVC 3 projects? Even after I installed SP1 for Visual Studio 2010 I found that css style manager still cannot recognize stylesheet links from layout view files.

我想防爆pression网站也没有这个东西任何支持呢。
你有什么可以用它来帮助自己和管理所有这些混乱更容易,而不是人工手动操作呢?

I guess Expression Web is also doesn't have any support of this stuff yet. Is there anything you can use to help yourself and manage all that mess easier rather than doing that manually?

推荐答案

我已经建立了一些pretty复杂的风格和总是使用同样的方法。漂亮干净的语法和良好的CSS文件(S)评论。像这样的:

I've built some pretty complicated styles and always used the same approach. Nice clean syntax and good commenting in the css file(s). Like this:

/***** /Products/Edit ******/
#productsContainer { background-color: #99bbff; }
#productsContainer fieldset.edit { margin: 1em 0 .2em 0; background-color: #dadada; }
#productsContainer fieldset.edit label { display: block; }
/***************************/

如果你保持组织,控制你的造型的效率,并选择使用类似CleverCSS: https://开头的github .COM / dziegler / clevercss ,则可以无需复杂开销,可以打破的工具来管理您的样式。下面CleverCSS例如:

If you stay organized, control the efficiency of your styling, and optionally use something like CleverCSS: https://github.com/dziegler/clevercss, you can manage your styles without complicated overhead and tools that can break. CleverCSS example below:

/***** /Products/Edit ******/
#productsContainer
    background-color: #99bbff
    fieldset.edit:
        margin: 1em 0 .2em 0
        background-color: #dadada
        label:
            display: block;
/***************************/

但是,是的,您也可以选择使用类似WebStorm(http://www.jetbrains.com/webstorm/)来编辑您的JavaScript,HTML,CSS等,或等待防爆pression网络做好准备(我猜想不到一年的时间,直到它变得与MVC兼容)。

But yeah, optionally you can use something like WebStorm (http://www.jetbrains.com/webstorm/) to edit your javascript, html, css, etc. Or wait for Expression Web to be ready (I'd guess less than a year until it becomes compatible with MVC).

这篇关于MVC 3,CSS,剃刀和Visual Studio 2010的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆