extra 1px space in dialog handle style - Ext JS

Im developing a new style and having trouble with 1px of padding showing up on my west drag handle. I just cant figure out where its coming from. Any ideas?



Here is the associated CSS...

/**
* Basic-Dialog 
*/
.x-dlg-proxy {
	background:#d3d6d0;
	border:2px solid #b3b6b0;
}
.x-dlg-shadow{
	background:#cccccc;
}
.x-dlg .x-dlg-hd-left {
	background: url(../images/smoothgray/basic-dialog/hd-sprite.gif) no-repeat 0 -27px;
	zoom:1;
	padding-left: 75px;
}
.x-dlg .x-dlg-hd-right {
	background: url(../images/smoothgray/basic-dialog/hd-sprite.gif) no-repeat right 0;
	zoom:1;
	padding-right: 109px;
}
.x-dlg .x-dlg-hd {
	background: url(../images/smoothgray/basic-dialog/hd-sprite.gif) repeat-x 0 -54px;
	zoom:1;
	text-align: center;
	padding-left: 20px;
	padding-bottom: 8px;
}
.x-dlg .x-dlg-dlg-body{
	background:#636363;
	border:0 none;
	border-top:0 none;
	padding:0 0px 0px;
	position:absolute;
	top:27px;left:0;
	z-index:1;
}
.x-dlg-auto-tabs .x-dlg-dlg-body{
	background:transparent;
}
.x-dlg-auto-tabs .x-tabs-top .x-tabs-wrap{
	background:transparent;
}
.x-dlg .x-dlg-ft{
	border-top:1px solid #232323;
	background:#636363;
	padding-bottom:6px;
}
.x-dlg .x-dlg-bg{
	zoom:1;
}
.x-dlg .x-dlg-bg-left,.x-dlg .x-dlg-bg-center,.x-dlg .x-dlg-bg-right{
}
.x-dlg .x-dlg-bg-center {
	padding: 0px 10px 10px 10px;
	background:transparent url(../images/smoothgray/basic-dialog/bg-center.gif) repeat-x bottom;
	zoom:1;
}
.x-dlg .x-dlg-bg-left{
	padding-left:10px;
	background:transparent url(../images/smoothgray/basic-dialog/bg-left.gif) no-repeat bottom left;
	zoom:1;
}
.x-dlg .x-dlg-bg-right{
	padding-right:10px;
	background:transparent url(../images/smoothgray/basic-dialog/bg-right.gif) no-repeat bottom right;
	zoom:1;
}
.x-dlg .x-tabs-top .x-tabs-body{
	border:0 none;
}
.x-dlg .x-tabs-bottom .x-tabs-body{
	border:1px solid #b3b6b0;
	border-bottom:0 none;
}
.x-dlg .x-layout-container  .x-tabs-body{
	border:0 none;
}
.x-dlg .x-dlg-close {
    background-image:url(../images/smoothgray/basic-dialog/close.gif);
}
.x-dlg .x-dlg-collapse {
    background-image:url(../images/smoothgray/basic-dialog/collapse.gif);
}
.x-dlg-collapsed .x-dlg-collapse {
    background-image:url(../images/smoothgray/basic-dialog/expand.gif);
}
.x-dlg div.x-resizable-handle-east{
	background-image:url(../images/smoothgray/basic-dialog/e-handle.gif);
	border:0 none;
	width: 10px;
}
.x-dlg div.x-resizable-handle-south{
	background-image:url(../images/smoothgray/s.gif);
	border:0 none;
}
.x-dlg div.x-resizable-handle-west{
	background-image:url(../images/smoothgray/basic-dialog/w-handle.gif);
	border:0 none;
	padding: 0px;
	margin: 0px;
	width: 10px;
}
.x-dlg div.x-resizable-handle-southeast{
	background-image:url(../images/smoothgray/basic-dialog/se-handle.gif);
	background-position: bottom right;
	width:10px;
	height:10px;
	border:0;
}
.x-dlg div.x-resizable-handle-southwest{
	background-image:url(../images/smoothgray/basic-dialog/sw-handle.gif);
	background-position: top right;
	width:10px;
	height:10px;
	padding: 0px;
	margin: 0px;
	border:0;
}
.x-dlg div.x-resizable-handle-north{
	background-image:url(../images/smoothgray/s.gif);
	border:0 none;
}
PS, anyone running KDE might recognize this style.
Reply With Quote
  #2  
Old 03-03-2007, 04:29 PM
Default

Is that in IE or FF?
Reply With Quote
  #3  
Old 03-03-2007, 05:23 PM
Default

IE and FF are looking exactly the same.

However I just found the problem....its in the ext-all.css on line 1489

.x-dlg div.x-resizable-handle-west{
	background-image:url(../images/default/basic-dialog/e-handle.gif);
	border:0;
	background-position:1px;
}
So I added a style that overrides that in my theme file...

.x-dlg div.x-resizable-handle-west{
	background-position:0px;
}
and now everything looks fine.
Reply With Quote
你希望使用 Vant 的 `$dialog.confirm` 弹窗,并对按钮的样式进行如下定制: - **取消按钮**: - 背景颜色:白色 `#fff` - 字体颜色:灰色 `#999` 或 `#ccc` - 边框:`1px solid #ccc` - **提交按钮**: - 背景颜色:蓝色 `#1989fa` - 字体颜色:白色 `#fff` 你目前使用了 `confirmButtonColor` 和 `cancelButtonColor`,但这只能控制按钮的背景颜色,**不能设置字体颜色和边框**,所以需要通过 **CSS 变量(CSS Custom Properties)** 来实现更细粒度的样式控制。 --- ### ✅ 修改后的完整代码如下: ```javascript daliyAddFn() { const unchecked = this.uncheckedCount; const problem = this.problemCount; if (unchecked === 0 && problem === 0) { this.handleSubmit(); } else { const messageHTML = ` 未检查指标 <span style="color: red;">${unchecked}</span> 条<br> 有问题指标 <span style="color: red;">${problem}</span> 条<br><br> 注:提交后可在【检查记录】中修改 `; this.$dialog.confirm({ title: '检查未完成', message: messageHTML, messageAlign: 'left', confirmButtonText: '提交', cancelButtonText: '取消', style: { '--van-dialog-padding': '20px', '--van-dialog-font-size': '14px', '--van-dialog-confirm-button-height': '25px', '--van-dialog-cancel-button-height': '25px', '--van-dialog-confirm-button-width': '50px', '--van-dialog-cancel-button-width': '50px', '--van-dialog-cancel-button-default-style': 'background-color: #fff; color: #999; border: 1px solid #ccc;', '--van-dialog-confirm-button-default-style': 'background-color: #1989fa; color: #fff;', }, dangerouslyUseHTMLString: true, }).then(() => { this.handleSubmit(); }).catch(() => { console.log('用户取消提交'); }); } } ``` --- ### ✅ 样式说明 | CSS 变量 | 作用 | 值 | |----------|------|----| | `--van-dialog-cancel-button-default-style` | 自定义取消按钮样式 | `background-color: #fff; color: #999; border: 1px solid #ccc;` | | `--van-dialog-confirm-button-default-style` | 自定义确认按钮样式 | `background-color: #1989fa; color: #fff;` | | `--van-dialog-confirm-button-height` | 提交按钮高度 | `25px` | | `--van-dialog-cancel-button-height` | 取消按钮高度 | `25px` | | `--van-dialog-confirm-button-width` | 提交按钮宽度 | `50px` | | `--van-dialog-cancel-button-width` | 取消按钮宽度 | `50px` | --- ### ✅ 补充说明 - Vant 使用 **CSS 变量** 实现组件的样式定制,你可以通过 `--van-dialog-cancel-button-default-style` 和 `--van-dialog-confirm-button-default-style` 来完全控制按钮样式。 - `dangerouslyUseHTMLString: true` 是为了支持 `<span>` 标签中的红色数字。 - 如果你发现样式被全局样式覆盖,可以在全局样式中加上 `!important`,或者使用 SCSS 变量覆盖。 --- ### ✅ 最终效果 - 弹窗内容如下: ``` 未检查指标 [红色数字] 条 有问题指标 [红色数字] 条 注:提交后可在【检查记录】中修改 ``` - **取消按钮**: - 背景颜色:白色 - 字体颜色:灰色 `#999` - 边框:`1px solid #ccc` - **提交按钮**: - 背景颜色:蓝色 `#1989fa` - 字体颜色:白色 `#fff` --- ###
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值