Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
192682d2
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
192682d2
编写于
3月 15, 2018
作者:
M
Matt Bierner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove builder border methods
Only used in tests
上级
3f99a49f
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
0 addition
and
150 deletion
+0
-150
src/vs/base/browser/builder.ts
src/vs/base/browser/builder.ts
+0
-115
src/vs/base/test/browser/builder.test.ts
src/vs/base/test/browser/builder.test.ts
+0
-35
未找到文件。
src/vs/base/browser/builder.ts
浏览文件 @
192682d2
...
...
@@ -1039,121 +1039,6 @@ export class Builder implements IDisposable {
}
}
/**
* Sets the CSS property border.
*/
public
border
(
border
:
string
):
Builder
;
public
border
(
width
:
number
,
style
?:
string
,
color
?:
string
):
Builder
;
public
border
(
width
:
any
,
style
?:
string
,
color
?:
string
):
Builder
{
if
(
types
.
isString
(
width
)
&&
width
.
indexOf
(
'
'
)
>=
0
)
{
return
this
.
border
.
apply
(
this
,
width
.
split
(
'
'
));
}
this
.
currentElement
.
style
.
borderWidth
=
this
.
toPixel
(
width
);
if
(
color
)
{
this
.
currentElement
.
style
.
borderColor
=
color
;
}
if
(
style
)
{
this
.
currentElement
.
style
.
borderStyle
=
style
;
}
return
this
;
}
/**
* Sets the CSS property border-top.
*/
public
borderTop
(
border
:
string
):
Builder
;
public
borderTop
(
width
:
number
,
style
:
string
,
color
:
string
):
Builder
;
public
borderTop
(
width
:
any
,
style
?:
string
,
color
?:
string
):
Builder
{
if
(
types
.
isString
(
width
)
&&
width
.
indexOf
(
'
'
)
>=
0
)
{
return
this
.
borderTop
.
apply
(
this
,
width
.
split
(
'
'
));
}
this
.
currentElement
.
style
.
borderTopWidth
=
this
.
toPixel
(
width
);
if
(
color
)
{
this
.
currentElement
.
style
.
borderTopColor
=
color
;
}
if
(
style
)
{
this
.
currentElement
.
style
.
borderTopStyle
=
style
;
}
return
this
;
}
/**
* Sets the CSS property border-bottom.
*/
public
borderBottom
(
border
:
string
):
Builder
;
public
borderBottom
(
width
:
number
,
style
:
string
,
color
:
string
):
Builder
;
public
borderBottom
(
width
:
any
,
style
?:
string
,
color
?:
string
):
Builder
{
if
(
types
.
isString
(
width
)
&&
width
.
indexOf
(
'
'
)
>=
0
)
{
return
this
.
borderBottom
.
apply
(
this
,
width
.
split
(
'
'
));
}
this
.
currentElement
.
style
.
borderBottomWidth
=
this
.
toPixel
(
width
);
if
(
color
)
{
this
.
currentElement
.
style
.
borderBottomColor
=
color
;
}
if
(
style
)
{
this
.
currentElement
.
style
.
borderBottomStyle
=
style
;
}
return
this
;
}
/**
* Sets the CSS property border-left.
*/
public
borderLeft
(
border
:
string
):
Builder
;
public
borderLeft
(
width
:
number
,
style
:
string
,
color
:
string
):
Builder
;
public
borderLeft
(
width
:
any
,
style
?:
string
,
color
?:
string
):
Builder
{
if
(
types
.
isString
(
width
)
&&
width
.
indexOf
(
'
'
)
>=
0
)
{
return
this
.
borderLeft
.
apply
(
this
,
width
.
split
(
'
'
));
}
this
.
currentElement
.
style
.
borderLeftWidth
=
this
.
toPixel
(
width
);
if
(
color
)
{
this
.
currentElement
.
style
.
borderLeftColor
=
color
;
}
if
(
style
)
{
this
.
currentElement
.
style
.
borderLeftStyle
=
style
;
}
return
this
;
}
/**
* Sets the CSS property border-right.
*/
public
borderRight
(
border
:
string
):
Builder
;
public
borderRight
(
width
:
number
,
style
:
string
,
color
:
string
):
Builder
;
public
borderRight
(
width
:
any
,
style
?:
string
,
color
?:
string
):
Builder
{
if
(
types
.
isString
(
width
)
&&
width
.
indexOf
(
'
'
)
>=
0
)
{
return
this
.
borderRight
.
apply
(
this
,
width
.
split
(
'
'
));
}
this
.
currentElement
.
style
.
borderRightWidth
=
this
.
toPixel
(
width
);
if
(
color
)
{
this
.
currentElement
.
style
.
borderRightColor
=
color
;
}
if
(
style
)
{
this
.
currentElement
.
style
.
borderRightStyle
=
style
;
}
return
this
;
}
private
toPixel
(
obj
:
any
):
string
{
if
(
obj
.
toString
().
indexOf
(
'
px
'
)
===
-
1
)
{
return
obj
.
toString
()
+
'
px
'
;
...
...
src/vs/base/test/browser/builder.test.ts
浏览文件 @
192682d2
...
...
@@ -664,41 +664,6 @@ suite('Builder', () => {
});
});
test
(
'
Builder.border(), .borderTop(), .borderBottom(), .borderLeft(), .borderRight()
'
,
function
()
{
let
b
=
Build
.
withElementById
(
fixtureId
);
b
.
div
();
b
.
border
(
'
1px solid red
'
);
assert
.
strictEqual
(
b
.
style
(
'
border-width
'
),
'
1px
'
);
assert
.
strictEqual
(
b
.
style
(
'
border-color
'
),
'
red
'
);
assert
.
strictEqual
(
b
.
style
(
'
border-style
'
),
'
solid
'
);
b
.
borderTop
(
'
2px dotted yellow
'
);
assert
.
strictEqual
(
b
.
style
(
'
border-top-width
'
),
'
2px
'
);
assert
.
strictEqual
(
b
.
style
(
'
border-top-color
'
),
'
yellow
'
);
assert
.
strictEqual
(
b
.
style
(
'
border-top-style
'
),
'
dotted
'
);
b
.
borderRight
(
'
3px dashed green
'
);
assert
.
strictEqual
(
b
.
style
(
'
border-right-width
'
),
'
3px
'
);
assert
.
strictEqual
(
b
.
style
(
'
border-right-color
'
),
'
green
'
);
assert
.
strictEqual
(
b
.
style
(
'
border-right-style
'
),
'
dashed
'
);
b
.
borderBottom
(
'
4px solid blue
'
);
assert
.
strictEqual
(
b
.
style
(
'
border-bottom-width
'
),
'
4px
'
);
assert
.
strictEqual
(
b
.
style
(
'
border-bottom-color
'
),
'
blue
'
);
assert
.
strictEqual
(
b
.
style
(
'
border-bottom-style
'
),
'
solid
'
);
b
.
borderLeft
(
'
5px dashed white
'
);
assert
.
strictEqual
(
b
.
style
(
'
border-left-width
'
),
'
5px
'
);
assert
.
strictEqual
(
b
.
style
(
'
border-left-color
'
),
'
white
'
);
assert
.
strictEqual
(
b
.
style
(
'
border-left-style
'
),
'
dashed
'
);
});
test
(
'
Builder.innerHtml()
'
,
function
()
{
let
b
=
Build
.
withElementById
(
fixtureId
);
b
.
div
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录