有没有办法将我的 UI 主题滚轮主题应用到我的 jquery 移动网站?

发布于 2024-12-10 04:25:26 字数 207 浏览 0 评论 0原文

我已经使用修改后的 jQuery UI 主题滚筒主题构建了一个标准站点。我正在尝试将相同的主题应用到我的 jQuery 移动网站。看来许多 css 类不匹配。

.ui-btn      <-- in mobile
.ui-button   <-- in theme roller

有没有一个工具可以帮助将这两者匹配起来?

I have already built a standard site using a modified jQuery UI theme roller theme. I am trying to apply the same theme to my jQuery mobile site. It seems many of the css classes don't match up.

.ui-btn      <-- in mobile
.ui-button   <-- in theme roller

Is there a tool that helps match the two of these up?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

绻影浮沉 2024-12-17 04:25:26

更新:在这里:

我知道 jQM 正在开发主题滚轮还有:

相关:

ThemeRoller 移动版:即将推出!

我们一直在开发一个全新的 ThemeRoller 工具,它是由
jQuery Mobile 的基础。 Adobe 的 Tyler Benzinger
带头开发工作(感谢泰勒!),我们非常
即将推出测试版。我们真的是
很高兴能展示它,因为有很多超酷的功能
这使得在几分钟内构建一个令人惊叹的主题变得非常简单。

如果您要参加在波士顿举行的 jQuery 会议,您将获得
在斯科特和托德的移动主题演讲中先睹为快。寻找一个
测试版将在未来一两周内推出。

jQuery Mobile 主题滚轮即将推出

UPDATE: It's here:

I know that jQM is working on a Theme Roller as well:

Related:

ThemeRoller Mobile: Coming soon!

We’ve been working on a completely new ThemeRoller tool, built from
the ground-up for jQuery Mobile. Tyler Benzinger from Adobe has been
spearheading the development effort (thanks Tyler!) and we’re very
close for having a beta version ready for release. We’re really
excited to show it off because there are a lot of super cool features
that make it drop-dead-simple to build a stunning theme in minutes.

If you’re going to be at the jQuery Conference in Boston, you’ll get a
sneak peek during the mobile keynote with Scott and Todd. Look for a
beta version to be launch within the next week or two.

jQuery Mobile Theme Roller Coming Soon

恬淡成诗 2024-12-17 04:25:26

你可以破解一个解决方案;当两个 CSS 类具有相同的目的但名称不同时,您可以转到 ThemeRoller CSS 并搜索“ui-button”的实例并修改它,以便(例如)一行显示:

.ui-button { rule }

变成

.ui-button, .ui-btn { rule }

但该死的,这是一个丑陋的黑客,不是真正的解决方案。如果规则更复杂,您就不能只进行搜索和替换。整个事情维护起来也会很烦人。修改任一 JavaScript 的基础也是如此;你可以将所有添加“ui-btn”的 DOM 操作更改为添加“ui-button”,但这是维护的噩梦。

jQuery UI Mobile ThemeRoller 即将发布。您可以等待并制作一个模仿旧主题的新主题。我觉得这是一条必经之路。否则,如果不能等待,我个人现在只会将所有样式从 ThemeRoller 迁移到 Mobile 样式表。这是体力劳动,但更适合未来。

You could hack a solution into place; when two CSS classes have the same purpose but different names, you could go to the ThemeRoller CSS and search for instances of "ui-button" and modify it so that (for example) a line says:

.ui-button { rule }

becomes

.ui-button, .ui-btn { rule }

But damn that's an ugly hack, not a real solution. And if the rules are more complex, you can't just do a search-and-replace. The whole thing would be annoying to maintain, too. Ditto for modifying the base of either JavaScript; you could change all the DOM manipulations that add "ui-btn" to add "ui-button" instead, but it's a maintenance nightmare.

There's a jQuery UI Mobile ThemeRoller that's to be released soon. You could just wait for that and make a new theme that mimics your old one. Strikes me as the way to go. Otherwise, if it can't wait I would personally just migrate any styles from ThemeRoller to the Mobile stylesheet for now. It's manual labor, but is a teeny bit more future-proof.

浪漫之都 2024-12-17 04:25:26

您已经正确地发现两个框架中的类名不相同。您可以编写一些 JavaScript 来搜索特定的 jQuery Mobile 类并添加与该元素对应的 jQuery UI 类。

例子:

$('.ui-btn').addClass('ui-button');

You have correctly discovered that the class names are not the same in the two frameworks. You could write some JavaScript that searches for specific jQuery Mobile classes and adds the jQuery UI classes that correspond to that element.

Example:

$('.ui-btn').addClass('ui-button');
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文