Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Add bottom margin to cards list. | #cards-list-container {
padding: 150px 15px 15px 250px;
position: relative;
z-index: 1;
}
.cards-list {
height: 100%;
position: relative;
width: 100%;
}
| #cards-list-container {
margin-bottom: 15px;
padding: 150px 15px 15px 250px;
position: relative;
z-index: 1;
}
.cards-list {
height: 100%;
position: relative;
width: 100%;
}
|
Disable pointer events on inactive bullets | // Bespoke Classes: https://github.com/markdalgleish/bespoke-classes
// Stylus: http://learnboost.github.io/stylus
@import 'normalizecss/normalize.css'
.bespoke-parent
position: absolute
top: 0
left: 0
right: 0
bottom: 0
.bespoke-scale-parent
position: absolute
top: 0
left: 0
right: 0
bottom: 0
... | // Bespoke Classes: https://github.com/markdalgleish/bespoke-classes
// Stylus: http://learnboost.github.io/stylus
@import 'normalizecss/normalize.css'
.bespoke-parent
position: absolute
top: 0
left: 0
right: 0
bottom: 0
.bespoke-scale-parent
position: absolute
top: 0
left: 0
right: 0
bottom: 0
... |
Fix display of recent blog posts after theme update | // Blog Feed
.blog-feed
margin-top global-margin * 3
.blog-feed__header
margin-top global-margin * 2
a
text-decoration none
a:hover
text-decoration underline
.blog-feed__posts
margin-top global-margin
display flex
flex-flow row wrap
margin-left: -20px;
margin-right: -20px;
// Blog Post
... | // Blog Feed
.blog-feed
margin-top global-margin * 3
.blog-feed__header
margin-top global-margin * 2
a
text-decoration none
a:hover
text-decoration underline
.blog-feed__posts
margin-top global-margin
display flex
flex-flow row wrap
margin-left: -20px;
margin-right: -20px;
// Blog Post
... |
Fix browser discrepancy on textarea | // Wrap in body for higher specificity
body
.mdl-textfield--floating-label.is-invalid .mdl-textfield__label
color mdl-error
.mdl-textfield__error
display block
:invalid
box-shadow none
.textarea-label:a... | .mdl-textfield
.mdl-textfield--floating-label.is-invalid .mdl-textfield__label
color mdl-error
.mdl-textfield__error
display block
:invalid
box-shadow none
textarea
vertical-align ... |
Remove text on small screen :art: | .introjs-tooltip
background-color transparent
color white
box-shadow none
.tooltipBottom
min-width inherit
max-width inherit
width 200%!important // @stylint ignore
.tooltipRight, .tooltipSmallRight
min-width 100%
max-width 100%
.tooltipSmallBottom
margin-top -20px
left -10px!... | .introjs-tooltip
background-color transparent
color white
box-shadow none
.tooltipBottom
min-width inherit
max-width inherit
width 200%!important // @stylint ignore
.tooltipRight, .tooltipSmallRight
min-width 100%
max-width 100%
.tooltipSmallBottom
margin-top -20px
left -10px!... |
Implement user edit page in ACP | // Page header block (under breadcrubmbs): title + description
//
@import "nodeca.core/client/common/_variables"
.page-head
margin-top 1.5rem
margin-bottom 1rem
.page-actions
margin-top -.25rem
.page-head__title
margin 0
font-weight normal
font-size $font-size-h3
//color $brand-primary
| // Page header block (under breadcrubmbs): title + description
//
@import "nodeca.core/client/common/_variables"
.page-head
margin-top 1.5rem
margin-bottom 1rem
.page-actions
margin-top -.25rem
.page-head__title
margin 0
font-weight normal
font-size $font-size-h3
//color $brand-primary
.page-head... |
Add osx font smoothing for firefox too | html
body
padding: 0
margin: 0
body
-webkit-font-smoothing: antialiased
position: relative
img
border: 0
| html
body
padding: 0
margin: 0
body
-webkit-font-smoothing: antialiased
-moz-osx-font-smoothing: grayscale
position: relative
img
border: 0
|
Fix the live auction preview image width in Safari | @require '../stylus_lib'
reminder-width = 500px
reminder-height = 120px
.auction-reminders
position fixed
bottom 40px
right 40px
z-index zindex-modal
.auction-reminder
position relative
display flex
width reminder-width
height reminder-height
block-margins(15px)
padding 15px 90px 15px 15px
alig... | @require '../stylus_lib'
reminder-width = 500px
reminder-height = 120px
.auction-reminders
position fixed
bottom 40px
right 40px
z-index zindex-modal
.auction-reminder
position relative
display flex
width reminder-width
height reminder-height
block-margins(15px)
padding 15px 90px 15px 15px
alig... |
Add box-sizing: border box on all elements | global-reset()
@import variables
html
height 100%
body
height 100%
font-size 18px
font-family Lato, sans-serif
font-weight 300
margin 0
a
color link-color
h1, h2, h3, h4, h5
font-weight 400
@import layout
@import helpers
@import buttons
@import alerts
@import builds
@import projects
| @import variables
global-reset()
*
box-sizing border-box
html
height 100%
body
height 100%
font-size 18px
font-family Lato, sans-serif
font-weight 300
margin 0
a
color link-color
h1, h2, h3, h4, h5
font-weight 400
@import layout
@import helpers
@import buttons
@import alerts
@import builds
@impo... |
Load normalize from node_modules using webpack's resolver | @import '_vars.styl'
:global
@import 'normalize.css/normalize.css'
html
font-family "futura-pt", sans-serif
&.wf-loading
color transparent
*
color transparent !important
text-shadow none !important
::selection
background selection-color
color lighten(selection-color, 75%)
a
color accentCo... | @import '_vars.styl'
:global
@import '~normalize.css/normalize.css'
html
font-family "futura-pt", sans-serif
&.wf-loading
color transparent
*
color transparent !important
text-shadow none !important
::selection
background selection-color
color lighten(selection-color, 75%)
a
color accentC... |
Add extra exclamation mark to preserve buffered/important comment structure | /*! baremetal v0.1.0 | MIT License | github.com/ryennelsen/baremetal */
@require globals
@require variables
@require grid
@require forms
| /*!! baremetal v0.1.0 | MIT License | github.com/ryennelsen/baremetal */
@require globals
@require variables
@require grid
@require forms
|
Increase map height on narrow screens | // maintain aspect ratio of 4:3 for the map, see
// https://stackoverflow.com/questions/1495407/maintain-the-aspect-ratio-of-a-div-with-css
//
.location-show-dlg__map-container
width 100%
padding-bottom 75%
position relative
// same background as for .leaflet-container,
// in case styles for leaflet aren't l... | @import "nodeca.core/client/common/_variables"
// maintain aspect ratio of 4:3 for the map, see
// https://stackoverflow.com/questions/1495407/maintain-the-aspect-ratio-of-a-div-with-css
//
.location-show-dlg__map-container
width 100%
padding-bottom 75%
position relative
// same background as for .leaflet-con... |
Tweak alignment of stats tooltips | .main-page
h1
font-weight 300
margin-bottom 0
.stat-display
display inline-block
width 100%
margin 40px 0 20px 0
display flex
justify-content space-between
flex-flow wrap
.stat-display__stat
margin 0 20px 20px 20px
text-align center
width calc(50% - 40px)
+above(desktop)
... | .main-page
h1
font-weight 300
margin-bottom 0
.stat-display
display inline-block
width 100%
margin 40px 0 20px 0
display flex
justify-content space-between
flex-flow wrap
.stat-display__stat
margin 0 20px 20px 20px
text-align center
width calc(50% - 40px)
+above(desktop)
... |
Fix .l-center appearing and disappearing. | // Tâmia © 2013 Artem Sapegin http://sapegin.me
// Helper classes
// Element is hidden.
.is-hidden
display: none
/// Element is in transit between hidden (.is-hidden) and visible.
.is-transit
display: block
// Disabled form element.
.is-disabled
cursor: default
pointer-events: none
opacity: .4
text-shadow: non... | // Tâmia © 2013 Artem Sapegin http://sapegin.me
// Helper classes
// Element is hidden.
.is-hidden
display: none
/// Element is in transit between hidden (.is-hidden) and visible.
.is-transit
display: block
&.l-center
display: table
// Disabled form element.
.is-disabled
cursor: default
pointer-events: none
... |
Fix styling on mobile page | @require '_frontend/styles/colors'
@require '_frontend/styles/grid'
@require '_frontend/styles/spacing'
.form {
col(1/2, offset: 1/4)
background-color $white
border-radius 5px
margin-top $spacing2x
margin-bottom $spacing2x
padding $spacing2x
}
.section {
margin-bottom $spacing1x
}
.input {
border 1px... | @require '_frontend/styles/colors'
@require '_frontend/styles/grid'
@require '_frontend/styles/spacing'
.form {
+desktop() {
col(1/2, offset: 1/4)
}
+tablet() {
margin-right $spacing2x
margin-left $spacing2x
}
+mobile() {
border-radius 0
}
background-color $white
border-radius 5px
... |
Remove visited state for item-action buttons | .btn.item-action {
color: #9B9B9B !important;
font-size: 13px;
font-weight: bold;
&:hover,
&:focus,
&:active,
&:visited {
color: #555 !important;
text-decoration: none;
}
}
| .btn.item-action {
color: #9B9B9B !important;
font-size: 13px;
font-weight: bold;
&:hover,
&:focus,
&:active {
color: #555 !important;
text-decoration: none;
}
}
|
Remove left gallery icon padding | @require '../../../../components/inquiry_questionnaire/stylesheets'
.artwork-partner
display flex
block-margins(gutter / 2)
padding gutter 0
align-items center
&__icon
&__metadata
padding 0 (gutter / 2)
&__icon
&--icon
background-color white
> a
display block
width 90px
... | @require '../../../../components/inquiry_questionnaire/stylesheets'
.artwork-partner
display flex
block-margins(gutter / 2)
padding gutter 0
align-items center
&__metadata
padding 0 (gutter / 2)
&__icon
padding-right (gutter / 2)
&--icon
background-color white
> a
display b... |
Fix url string on font-face | @font-face
font-family 'Lato'
font-style normal
font-weight 400
src local('Lato Normal'),
local('Lato-Normal'),
url(https://themes.googleusercontent.com/static/fonts/lato/v6/9k-RPmcnxYEPm8CNFsH2gg.woff)
format('woff')
| @font-face
font-family 'Lato'
font-style normal
font-weight 400
src local('Lato Normal'),
local('Lato-Normal'),
url('https://themes.googleusercontent.com/static/fonts/lato/v6/9k-RPmcnxYEPm8CNFsH2gg.woff')
format('woff')
|
Fix margin on worker list | .worker-list
list-style-type none
li
width 80%
padding 1em
margin 0.5em auto
display inline-block
border link-color 1px solid
h3
margin 0
.versions
margin 0
dt
font-weight 400
display inline-block
margin .4em
&:first-child
margin-left 0
... | .worker-list
list-style-type none
margin 0
li
width 80%
padding 1em
margin 0.5em auto
display inline-block
border link-color 1px solid
h3
margin 0
.versions
margin 0
dt
font-weight 400
display inline-block
margin .4em
&:first-child
margin-l... |
Index page: fix for mobile phones (narrow screen) | .home-slogan
text-align center
.home-description
text-align center
margin-bottom 40px
.home-download
background #eee
display flex
justify-content space-between
align-items center
a
text-decoration none
.home-logo
padding 20px 40px 20px 20px
img
height 120px
.home-download-details
flex... | .home-slogan
text-align center
.home-description
text-align center
margin-bottom 40px
.home-download
background #eee
display flex
justify-content space-between
align-items center
a
text-decoration none
.home-logo
padding 20px 40px 20px 20px
img
height 120px
.home-download-details
flex... |
Move underlined tabs definition to separate style | @import "nodeca.core/client/common/_variables"
.btn + .btn
margin-left .4rem
.btn-square
padding-left 0 !important
padding-right 0 !important
min-width 2.375em // 38px
.btn-sm.btn-square
min-width 2.0em // 28px
.btn-xs.btn-square
min-width 1.917em // 23px
.dropdown-toggle.btn-square:after
margin-lef... | @import "nodeca.core/client/common/_variables"
.btn + .btn
margin-left .4rem
.btn-square
padding-left 0 !important
padding-right 0 !important
min-width 2.375em // 38px
.btn-sm.btn-square
min-width 2.0em // 28px
.btn-xs.btn-square
min-width 1.917em // 23px
.dropdown-toggle.btn-square:after
margin-lef... |
Use a webpack compatible import statement for nib | @import nib
.g-item-image-viewer-select
select
display inline
width auto
margin-left 25px
.image-viewer
border 1px solid #f0f0f0
width 100%
height 600px
-webkit-touch-callout none
user-select none
&:focus
outline none
.g-li-full-screen
width 100%
height 100%
posit... | @import '~nib/index.styl'
.g-item-image-viewer-select
select
display inline
width auto
margin-left 25px
.image-viewer
border 1px solid #f0f0f0
width 100%
height 600px
-webkit-touch-callout none
user-select none
&:focus
outline none
.g-li-full-screen
width 100%
heigh... |
Tweak articles margin when with other information | @require '../tabs'
.artwork-additional-info
//
&__content
//
&__articles
//
&__article
display table
width 75%
block-margins(gutter / 2)
text-decoration none
&__image
&__metadata
display table-cell
vertical-align middle
&__metadata
padding-left (gutt... | @require '../tabs'
.artwork-additional-info
//
&__content
//
&__articles
//
p + &__articles
margin-top gutter
&__article
display table
width 75%
block-margins(gutter / 2)
text-decoration none
&__image
&__metadata
display table-cell
vertical-align mid... |
Add top padding at the body | @import 'defs/colors'
header
header-height = 75px
item-height = 52px
background color_text_lighter
display block
position fixed
z-index 1
width 100%
height header-height
line-height header-height
.logo
margin 0 1em
display block
float left
img
margin-top ( ( header-height - item-height ) / 2 )... | @import 'defs/colors'
header-height = 75px
body
padding-top header-height
header
item-height = 52px
background color_text_lighter
display block
position fixed
z-index 1
width 100%
height header-height
line-height header-height
.logo
margin 0 1em
display block
float left
img
margin-top ( ( hea... |
Fix the layout of dropdown submenus | .histomicstk-body
#g-app-header-container
#h-navbar-brand
font-size 25px
font-weight 700
.g-header-wrapper
.h-image-menu-wrapper
display inline
float right
z-index 1000
@media (min-width: 768px)
.navbar-right
float none
margin-right 0
position abso... | .histomicstk-body
#g-app-header-container
#h-navbar-brand
font-size 25px
font-weight 700
.g-header-wrapper
.h-image-menu-wrapper
display inline
float right
z-index 1000
@media (min-width: 768px)
.navbar-right
float none
margin-right 0
position abso... |
Revert "Hidden class is more important" | @import "vars/colors.styl"
@import "vars/layout.styl"
@import "blocks/button/button.styl"
@import "blocks/popup/popup.styl"
@import "blocks/radio-button/radio-button.styl"
@import "blocks/select/select.styl"
@import "blocks/checkbox/checkbox.styl"
@import "blocks/icon/icon.styl"
IMG
border: 0;
._hidden
display:... | @import "vars/colors.styl"
@import "vars/layout.styl"
@import "blocks/button/button.styl"
@import "blocks/popup/popup.styl"
@import "blocks/radio-button/radio-button.styl"
@import "blocks/select/select.styl"
@import "blocks/checkbox/checkbox.styl"
@import "blocks/icon/icon.styl"
IMG
border: 0;
._hidden
display:... |
Use justify to align body text |
html
background-color: $hl
color: $fg
margin: 1em
body
background-color: $bg
margin: 0 auto
max-width: 23cm
border: 1pt solid $comment
padding: 1em
code
background-color: $hl
padding: 2px
a
color: $blue
a:visited
color: $orange
a:hover
color: $orange
h1
color: $red
h2,h3,h4,h5,h6
i... |
html
background-color: $hl
color: $fg
margin: 1em
body
background-color: $bg
margin: 0 auto
max-width: 23cm
border: 1pt solid $comment
padding: 1em
text-align: justify
code
background-color: $hl
padding: 2px
a
color: $blue
a:visited
color: $orange
a:hover
color: $orange
h1
color: $r... |
Add bespoke-scale styles for Firefox | <% if (syntax) { %>// Import CSS from "bower_components"
// thanks to Stylus' "import css" and "paths" options
@import 'prism/themes/prism-okaidia.css'
// Check out "bower_components/prism/themes/" for available themes
<% } %>// New to Stylus? Check out http://learnboost.github.io/stylus
// Use modern CSS thanks to Au... | <% if (syntax) { %>// Import CSS from "bower_components"
// thanks to Stylus' "import css" and "paths" options
@import 'prism/themes/prism-okaidia.css'
// Check out "bower_components/prism/themes/" for available themes
<% } %>// New to Stylus? Check out http://learnboost.github.io/stylus
// Use modern CSS thanks to Au... |
Increase project status badge padding | .project-details
.title
color #fff
max-width 290px
overflow-x hidden
text-overflow ellipsis
white-space nowrap
.projectStatus
padding: 1px 4px
| .project-details
.title
color #fff
max-width 290px
overflow-x hidden
text-overflow ellipsis
white-space nowrap
.projectStatus
padding: 5px 7px
|
Fix button color sticking on IE |
.meiosis, .meiosis-parent
position: relative
border: 1px solid lightgrey
width: 300px
height: 300px
.cell
width: 300px
height: 304px
.controls
margin-top: 10px
.buttons
display: inline-block
button
width: 38px
height: 38px
padding: 5px
.scrub
width: 125px
disp... |
.meiosis, .meiosis-parent
position: relative
border: 1px solid lightgrey
width: 300px
height: 300px
.cell
width: 300px
height: 304px
.controls
margin-top: 10px
.buttons
display: inline-block
button
width: 38px
height: 38px
padding: 5px
&:hover
// This is d... |
Improve layout for parameter summaries for model pages. PP-10 | .y-model-view
dock()
padding 0 35px
.y-tag
font-size 11px
text-transform uppercase
display inline-block
background y-color-yellow
padding 3px 5px
.y-title
font-size 36px
font-weight 300
.y-subtitle
font-size 22px
font-weight 300
.y-summary
background #f5f5f5
p... | .y-model-view
dock()
padding 0 35px
.y-tag
font-size 11px
text-transform uppercase
display inline-block
background y-color-yellow
padding 3px 5px
.y-title
font-size 36px
font-weight 300
.y-subtitle
font-size 22px
font-weight 300
.y-summary
background #f5f5f5
p... |
Move md-dialog on top of leaflet | yunity-orange = #f66c41;
.splash
height: 100%
background-color: yunity-orange
padding: 5em 0
.translucent-1
background-color: rgba(255, 255, 255, .1)
// the main layout panel
.main-panel
padding: 16px
margin-top: 1em
.md-dialog-container > md-dialog
width: 95%
max-width: 40em
.multiline
white-spa... | yunity-orange = #f66c41;
.splash
height: 100%
background-color: yunity-orange
padding: 5em 0
.translucent-1
background-color: rgba(255, 255, 255, .1)
// the main layout panel
.main-panel
padding: 16px
margin-top: 1em
.md-dialog-container > md-dialog
width: 95%
max-width: 40em
.multiline
white-spa... |
Change tabs style to underlined | @import "nodeca.core/client/common/_variables"
.btn + .btn
margin-left .4rem
.btn-square
padding-left 0 !important
padding-right 0 !important
min-width 2.375em // 38px
.btn-sm.btn-square
min-width 2.0em // 28px
.btn-xs.btn-square
min-width 1.917em // 23px
.dropdown-toggle.btn-square:after
margin-lef... | @import "nodeca.core/client/common/_variables"
.btn + .btn
margin-left .4rem
.btn-square
padding-left 0 !important
padding-right 0 !important
min-width 2.375em // 38px
.btn-sm.btn-square
min-width 2.0em // 28px
.btn-xs.btn-square
min-width 1.917em // 23px
.dropdown-toggle.btn-square:after
margin-lef... |
Remove NIB import - unused | @import 'nib'
body
color: #222
font-family: 'Droid Sans', sans-serif
padding-bottom: 40px
ul#url
line-height: 36px
font-size: 20px
color: #222
span.divider
padding: 2px;
.getpost
padding: 5px
font-size: 12px
margin-right: 10px
.hero-unit
background-color: #3A87AD
border-top-left... | body
color: #222
font-family: 'Droid Sans', sans-serif
padding-bottom: 40px
ul#url
line-height: 36px
font-size: 20px
color: #222
span.divider
padding: 2px;
.getpost
padding: 5px
font-size: 12px
margin-right: 10px
.hero-unit
background-color: #3A87AD
border-top-left-radius: 0px;
... |
Add fix height to top line | *
box-sizing: border-box
html, body
height: 100%
body
background: #F9F7F4
font-family: Arial, Helvetica, sans-serif
cursor: default
.app-container
.app
height: 100vh
display: flex
flex-direction: column
align-items: center
box-shadow: 0 2px 15px 0 rgba(0,0,0,0.2), 0 2px 10px 0 rgba(0, 0, 0, 0.12... | *
box-sizing: border-box
html, body
height: 100%
body
background: #F9F7F4
font-family: Arial, Helvetica, sans-serif
cursor: default
.app-container
.app
height: 100vh
display: flex
flex-direction: column
align-items: center
box-shadow: 0 2px 15px 0 rgba(0,0,0,0.2), 0 2px 10px 0 rgba(0, 0, 0, 0.12... |
Align all headings in the center |
html
background-color: $hl
color: $fg
margin: 1em
body
background-color: $bg
margin: 0 auto
max-width: 23cm
border: 1pt solid $comment
padding: 1em
code
background-color: $hl
padding: 2px
a
color: $yellow
a:visited
color: $orange
a:hover
color: $orange
h1
color: $magenta
h2,h3,h4,h5,... |
html
background-color: $hl
color: $fg
margin: 1em
body
background-color: $bg
margin: 0 auto
max-width: 23cm
border: 1pt solid $comment
padding: 1em
code
background-color: $hl
padding: 2px
a
color: $yellow
a:visited
color: $orange
a:hover
color: $orange
h1
color: $magenta
h2,h3,h4,h5,... |
Refactor defaults values for gs | ks-grid-fixed-col-width = 60px
ks-grid-fixed-gut-width = 20px
ks-grid-fixed-columns = 12
ks-grid-fixed-computed-total-width = ( ks-grid-fixed-col-width + ks-grid-fixed-gut-width ) * ks-grid-fixed-columns
ks-grid-fixed-total-width = ks-grid-fixed-computed-total-width
// default to fixed layout
ks-grid-config = {
"c... | ks-grid-fixed-col-width = 60px
ks-grid-fixed-gut-width = 20px
ks-grid-fixed-columns = 12
ks-grid-config = {}
@import "grid"
@import "row"
@import "column"
@import "offset"
// default to fixed layout
gs()
|
Make it a normal a selector | .BlogPost
// Classes come through with Jekyll generated HTML
// Not going to bother with correcting *that*
// So for now, force things to look correct
.post
//
> .post-header
collapsed-margins(2em)
> .post-category-title
collapsed-margins(2em)
> h1
margin 0
... | .BlogPost
// Classes come through with Jekyll generated HTML
// Not going to bother with correcting *that*
// So for now, force things to look correct
.post
//
> .post-header
collapsed-margins(2em)
> .post-category-title
collapsed-margins(2em)
> h1
margin 0
... |
Add relative font url imports (not used atm atm). | // These will not work if docs are file://local
@css {
@import url('///fonts.googleapis.com/css?family=Inconsolata');
@import url('///fonts.googleapis.com/css?family=PT+Sans');
@import url('///fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700');
}
| |
Add `.filtered` styling for `table`s (in addition to `tr`s) | @import nib
a
cursor pointer
a.disabled
cursor none
pointer-events none
color #999
a.disabled:hover
background-color transparent
.link-spacer
opacity 0.2
padding 0px 5px
#top-level-nav
visibility hidden
html.light-theme, html.dark-theme
#top-level-nav
visibility visibl... | @import nib
a
cursor pointer
a.disabled
cursor none
pointer-events none
color #999
a.disabled:hover
background-color transparent
.link-spacer
opacity 0.2
padding 0px 5px
#top-level-nav
visibility hidden
html.light-theme, html.dark-theme
#top-level-nav
visibility visibl... |
Move page progress base styles here from forum | @import "nodeca.core/client/common/_variables"
.page-progress
padding 0
margin 0
.page-progress__item
display inline-block
vertical-align middle
.page-progress__button-first
.page-progress__button-last
display block
position relative
padding 0 10px
height 50px
line-height 50px
color grayDark
&... | |
Add flip and return animation for Luna_sprite | /*********************************\
Components / Luna Sprite
\*********************************/
.c-luna-sprite__container
position absolute
left 0
width 100%
.c-luna-sprite__sprite
position absolute
width 60px
height 51px
z-index Z-ANIMATIONS
background url('images/luna-boot-scoot.png') 0 0
animati... | /*********************************\
Components / Luna Sprite
\*********************************/
.c-luna-sprite__container
position absolute
left 0
width 100%
.c-luna-sprite__sprite
position absolute
width 60px
height 51px
z-index Z-ANIMATIONS
background url('images/luna-boot-scoot.png') 0 0
animati... |
Add Commons SVG logo file | <?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="1024" height="1376" viewBox="-305 -516 610 820">
<title>Wikimedia Commons Logo</title>
<defs>
<clipPath id="c"><circle r="298"/></clipPath>
</defs>
<circle r="100" fill="#900"/... | |
Test showing problem on objectBoundingBox on text gradient. PR: Obtained from: Submitted by: Reviewed by: | <?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000802//EN"
"http://www.w3.org/TR/2000/CR-SVG-20000802/DTD/svg-20000802.dtd">
<!-- ========================================================================= -->
<!-- Copyright (C) The Apache Software Foundation. All rights reserved. -... | |
Set default test for Vidualize | <?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Bender</title>
<script xlink:href="flexo.js"/>
<script xlink:href="bender.js"/>
<script xlink:href="lib.js"/>
<g id="dest-body"/>
<script><![CDATA[
var args = ... | <?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny"
xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Bender</title>
<script xlink:href="flexo.js"/>
<script xlink:href="bender.js"/>
<script xlink:href="lib.js"/>
<g id="dest-body"/>
<script><![CDATA[
var args = ... |
Add icon image for a load button | <svg width="1792" height="1792" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1596 380q28 28 48 76t20 88v1152q0 40-28 68t-68 28h-1344q-40 0-68-28t-28-68v-1600q0-40 28-68t68-28h896q40 0 88 20t76 48zm-444-244v376h376q-10-29-22-41l-313-313q-12-12-41-22zm384 1528v-1024h-416q-40 0-68-28t-28-68v-416h-7... | |
Complete template part part-performance. Include the template part in the front page with php. | <?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Avocode 2.6.0 - http://avocode.com -->
<svg height="110" width="110" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 110 110">
<path fill="#f6f8f9" fill-rule="evenodd" d="M 55 0 C 85.38 0 110 24.62 110 55 C 110 85.38 8... | |
Fix icon using correct XML namespace | <?xml version="1.0"?>
<svg height="64" width="64">
<path filter="url(#a)" stroke="#fff" stroke-width="2" d="m12.95 11.536-1.414 1.414-3.536-3.5358-3.5355 3.5358-1.4142-1.414 3.5355-3.536-3.5355-3.5356 1.4142-1.4142 3.5355 3.5356 3.516-3.5547 1.434 1.4333-3.5357 3.5356z" fill="#fff"/>
<path d="m12.95 11.536-1.414 1.41... | <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">
<path d="m12.95 11.536-1.414 1.414-3.536-3.5358-3.5355 3.5358-1.4142-1.414 3.5355-3.536-3.5355-3.5356 1.4142-1.4142 3.5355 3.5356 3.516-3.5547 1.434 1.4333-3.5357 3.5356z"/>
<path d="m12.95 11.536-1.... |
Replace North Frisian flag with SVG equivalent | <?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="30" height="20"><image xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAUBAMAAABohZD3AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAVUExURRwt//8AAP/QAP/YABIu/14ftP+TAJf9yMoAAAAkSURBVBjTY1BCBQyU8o... | <?xml version="1.0"?><svg xmlns="http://www.w3.org/2000/svg" width="100" height="60"><rect width="100" height="60" fill="#1c2dff"/><rect width="100" height="40" fill="#f00"/><rect width="100" height="20" fill="#ffd000"/></svg> |
Remove redundant <path> in Bitbucket svg | <svg aria-labelledby="simpleicons-bitbucket-icon" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title id="simpleicons-bitbucket-icon">Bitbucket icon</title><path d="M.778 1.211c-.424-.006-.772.334-.778.758 0 .045.002.09.01.134l3.263 19.811c.084.499.515.867 1.022.872H19.95c.382.004.708-.271.77-.646l... | <svg aria-labelledby="simpleicons-bitbucket-icon" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title id="simpleicons-bitbucket-icon">Bitbucket icon</title><path d="M.778 1.211c-.424-.006-.772.334-.778.758 0 .045.002.09.01.134l3.263 19.811c.084.499.515.867 1.022.872H19.95c.382.004.708-.271.77-.646l... |
Update href svg test case to include viewBox. | <svg class="marks" width="400" height="200" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><clipPath id="clip1"><rect x="0" y="0" width="400" height="200"></rect></clipPath></defs><g transform="translate(0,0)"><g class="mark-group"><g transform="translate(0,0)" clip-pa... | <svg class="marks" width="400" height="200" viewBox="0 0 400 200" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><clipPath id="clip1"><rect x="0" y="0" width="400" height="200"></rect></clipPath></defs><g transform="translate(0,0)"><g class="mark-group"><g transform="t... |
Add icon image for hiding port of the module | <svg width="1792" height="1792" viewBox="-896 -896 3584 3584" xmlns="http://www.w3.org/2000/svg"><path d="M1344 800v64q0 14-9 23t-23 9h-832q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h832q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-... | |
Add some permitted and not permitted elements to the unknown element test | <svg xmlns="http://www.w3.org/2000/svg">
<metadata>
<sfw>
<slices></slices>
<sliceSourceBounds height="67.3" width="85.9" y="-40.8" x="-42.5" bottomLeftOrigin="true"></sliceSourceBounds>
</sfw>
</metadata>
</svg>
@@@
<svg xmlns="http://www.w3.org/2000/svg">
<metadat... | <svg xmlns="http://www.w3.org/2000/svg">
<metadata>
<sfw>
<slices></slices>
<sliceSourceBounds height="67.3" width="85.9" y="-40.8" x="-42.5" bottomLeftOrigin="true"></sliceSourceBounds>
</sfw>
<ellipse/>
</metadata>
<ellipse>
<font-face/>
</ellips... |
Add an SVG snippet for a 3-point circle | <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="64px" height="64px" viewBox="0 0 64 64">
<path stroke="#000" fill="#fff" d="M48,32c0-12.2711449-13.3754692-19.9822502-24.0180588-13.8466778S13.3393545,39.7111092,23.981945,45.8466797S48,44.2711449,48... | |
Make svg a sensible width |
<svg version="1.1" width="75%" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="1700.79px" height="11px" viewBox="0 0 1700.79 11" enable-background="new 0 0 1700.79 11"
xml:space="preserve">
<rect y="0" fill="none" width="1700.79" height="11"/>
</svg>
|
<svg version="1.1" width="75%" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="100px" height="11px" viewBox="0 0 100 11" enable-background="new 0 0 100 11"
xml:space="preserve">
<rect y="0" fill="none" width="100" height="11"/>
</svg>
|
Add svg logo to project | <?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://... | |
Add the French Flag as SVG image. | <?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="1200" height="600">
<rect width="1200" height="600" fill="#ED2939"/>
<rect width="800" height="600" fill... | |
Disable IRGen test case that tests vectorization of arrays to unblock a bot | // RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -Ounchecked %s -emit-ir | %FileCheck %s
// REQUIRES: CPU=x86_64
// FIXME: https://bugs.swift.org/browse/SR-2808
// XFAIL: resilient_stdlib
// We were missing target transform info and not vectorizing the loop below.
// CHECK: xor <2 x i64>
pu... | // RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -Ounchecked %s -emit-ir | %FileCheck %s
// REQUIRES: CPU=x86_64
// rdar://30579970
// REQUIRES: optimized_stdlib
// FIXME: https://bugs.swift.org/browse/SR-2808
// XFAIL: resilient_stdlib
// We were missing target transform info and not vector... |
Fix to reflect the value of isSelected in button value | //
// ButtonStyleSelectableBase.swift
// ButtonStyleKit
//
// Created by keygx on 2016/08/04.
// Copyright © 2016年 keygx. All rights reserved.
//
import UIKit
open class ButtonStyleSelectableBase: ButtonStyleKit {
override public final var isEnabled: Bool {
set {
if newValue {
... | //
// ButtonStyleSelectableBase.swift
// ButtonStyleKit
//
// Created by keygx on 2016/08/04.
// Copyright © 2016年 keygx. All rights reserved.
//
import UIKit
open class ButtonStyleSelectableBase: ButtonStyleKit {
override public final var isEnabled: Bool {
set {
if newValue {
... |
Fix swift 2.2 in standalone project | //
// ViewController.swift
// KonamiCode
//
// Created by Sebastien Morel on 10/17/14.
// Copyright (c) 2014 Plopix. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
@IBOutlet var stateLabel : UILabel!;
override func viewDidLoad() {
super.viewDidLoad()
le... | //
// ViewController.swift
// KonamiCode
//
// Created by Sebastien Morel on 10/17/14.
// Copyright (c) 2014 Plopix. All rights reserved.
//
import UIKit
class ViewController: UIViewController {
@IBOutlet var stateLabel : UILabel!;
override func viewDidLoad() {
super.viewDidLoad()
le... |
Replace open func to public func | //
// QueueController.swift
// AbstractPlayer
//
// Created by 林達也 on 2016/09/28.
// Copyright © 2016年 jp.sora0077. All rights reserved.
//
import Foundation
import AVKit
import AVFoundation
import RxSwift
public final class QueueController<Response> {
private var workerQueue: WorkerQueue<Response>!
... | //
// QueueController.swift
// AbstractPlayer
//
// Created by 林達也 on 2016/09/28.
// Copyright © 2016年 jp.sora0077. All rights reserved.
//
import Foundation
import AVKit
import AVFoundation
import RxSwift
public final class QueueController<Response> {
private var workerQueue: WorkerQueue<Response>!
... |
Update test for Windows path | extension (Int, Int) {}
// RUN: %sourcekitd-test -req=sema %s -- -Xfrontend -enable-descriptive-diagnostics -Xfrontend -diagnostic-documentation-path -Xfrontend /educational/notes/path/prefix %s | %FileCheck %s -check-prefix=DESCRIPTIVE
// DESCRIPTIVE: key.description: "non-nominal type
// DESCRIPTIVE: key.... | extension (Int, Int) {}
// RUN: %sourcekitd-test -req=sema %s -- -Xfrontend -enable-descriptive-diagnostics -Xfrontend -diagnostic-documentation-path -Xfrontend /educational/notes/path/prefix %s | %FileCheck %s -check-prefix=DESCRIPTIVE
// DESCRIPTIVE: key.description: "non-nominal type
// DESCRIPTIVE: key.... |
Add test case for `Pair` | //
// PairSpec.swift
// SwiftyEcharts
//
// Created by Pluto Y on 15/02/2017.
// Copyright © 2017 com.pluto-y. All rights reserved.
//
import Quick
import Nimble
import SwiftyEcharts
class PairSpec : QuickSpec {
override func spec() {
describe("Testing for type named 'SECTwoElement'") {
... | //
// PairSpec.swift
// SwiftyEcharts
//
// Created by Pluto Y on 15/02/2017.
// Copyright © 2017 com.pluto-y. All rights reserved.
//
import Quick
import Nimble
import SwiftyEcharts
class PairSpec : QuickSpec {
override func spec() {
describe("Testing for type named 'SECTwoElement'") {
... |
Exclude userId and userToken from post params | //
// Copyright © 2019 Ingresse. All rights reserved.
//
extension Request {
public struct UpdateUser: Encodable {
public struct BasicInfos: Encodable {
public var userId: String = ""
public var userToken: String = ""
public var name: String?
public var last... | //
// Copyright © 2019 Ingresse. All rights reserved.
//
extension Request {
public struct UpdateUser: Encodable {
public struct BasicInfos: Encodable {
public var userId: String = ""
public var userToken: String = ""
public var name: String?
public var last... |
Remove items that aren't supported by the version of iOS. | //
// Copyright (c) 2015 Itty Bitty Apps. All rights reserved.
//
import Foundation
private enum Attributes: String {
case Title = "title"
case Rows = "rows"
}
struct CollectableGroup<I: Collectable>: Collection {
typealias T = I
let items: [I]
let title: String?
init(dictionary: [String: AnyObject]) ... | //
// Copyright (c) 2015 Itty Bitty Apps. All rights reserved.
//
import Foundation
private enum Attributes: String {
case Title = "title"
case Rows = "rows"
}
struct CollectableGroup<I: Collectable>: Collection {
typealias T = I
let items: [I]
let title: String?
init(dictionary: [String: AnyObject]) ... |
Remove the default value for the index parameter in `fold`. | // Copyright © 2015 Rob Rix. All rights reserved.
public enum Telescope {
indirect case Recursive(Telescope)
indirect case Argument(Term, Telescope)
case End
public func fold(recur: Term, terminal: Term, index: Int = 0, combine: (Term, Term) -> Term) -> Term {
switch self {
case .End:
return terminal
c... | // Copyright © 2015 Rob Rix. All rights reserved.
public enum Telescope {
indirect case Recursive(Telescope)
indirect case Argument(Term, Telescope)
case End
public func fold(recur: Term, terminal: Term, index: Int, combine: (Term, Term) -> Term) -> Term {
switch self {
case .End:
return terminal
case ... |
Refactor URLPredicate tests and fix typo | import XCTest
import Peppermint
class URLPredicateTests: XCTestCase {
var predicate: URLPredicate!
override func setUp() {
super.setUp()
predicate = URLPredicate()
}
override func tearDown() {
predicate = nil
super.tearDown()
}
func testThatItEvaluatesVal... | import XCTest
import Peppermint
class URLPredicateTests: XCTestCase {
func testThatItEvaluatesValidURLToTrue() {
let sut = URLPredicate()
let result = sut.evaluate(with: "http://www.url.com")
XCTAssertTrue(result)
}
func testThatItEvaluatesInvalidURLToFalse() {
le... |
Format multiple minutes using relative formatter | //
// RelativeTimeFormatterTests.swift
// Peekazoo
//
// Created by Thomas Sherwood on 23/05/2017.
// Copyright © 2017 Peekazoo. All rights reserved.
//
import Peekazoo
import XCTest
struct RelativeTimeFormatter: TimeFormatter {
func string(from date: Date) -> String {
let now = Date()
if now... | //
// RelativeTimeFormatterTests.swift
// Peekazoo
//
// Created by Thomas Sherwood on 23/05/2017.
// Copyright © 2017 Peekazoo. All rights reserved.
//
import Peekazoo
import XCTest
struct RelativeTimeFormatter: TimeFormatter {
func string(from date: Date) -> String {
let now = Date()
let di... |
Call willMove before removing from parent vc | import UIKit
extension UIViewController {
// Adds a peekable view controller on top of another view controller. Since the view controller is the one we want to show when the user peeks through, we're saving time by loading it behind the peekable view controller.
@objc func wmf_setupPeekable(_ peekableViewContr... | import UIKit
extension UIViewController {
// Adds a peekable view controller on top of another view controller. Since the view controller is the one we want to show when the user peeks through, we're saving time by loading it behind the peekable view controller.
@objc func wmf_setupPeekable(_ peekableViewContr... |
Remove NSAttributedString height(considering) extention method | /*
MIT License
Copyright (c) 2017-2018 MessageKit
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, p... | /*
MIT License
Copyright (c) 2017-2018 MessageKit
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, p... |
Drop expected-* annotations from test; it's too messy to -verify. NFC | // Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
// RUN: not %swift %s -parse
struct c<e> {
let d: [( h // expected-note 4{{to match this opening}}
// expected-note @-1{{undeclared type}}
}... | // Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
// RUN: not %swift %s -parse
struct c<e> {
let d: [( h
}
func b(g: f) -> <e>(()-> e) -> i
|
Set json init with string public | //
// JSON+String.swift
//
//
// Created by Vladislav Fitc on 13.03.2020.
//
import Foundation
extension JSON {
init(jsonString: String) throws {
let data = jsonString.data(using: .utf8)!
let decoder = JSONDecoder()
self = try decoder.decode(JSON.self, from: data)
}
}
| //
// JSON+String.swift
//
//
// Created by Vladislav Fitc on 13.03.2020.
//
import Foundation
public extension JSON {
init(jsonString: String) throws {
let data = jsonString.data(using: .utf8)!
let decoder = JSONDecoder()
self = try decoder.decode(JSON.self, from: data)
}
}
|
Add missing import required to use a conformance | //===--- Error.swift ------------------------------------------*- swift -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2020 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.... | //===--- Error.swift ------------------------------------------*- swift -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2020 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.... |
Remove un-used internal name from observeNotification method. | //
// NotificationObservable.swift
// ESNotification
//
// Created by Tomohiro Kumagai on H27/11/22.
// Copyright © 平成27年 EasyStyle G.K. All rights reserved.
//
public protocol NotificationObservable : AnyObject {
}
extension NotificationObservable {
/// Observe an named notification. When the named notifica... | //
// NotificationObservable.swift
// ESNotification
//
// Created by Tomohiro Kumagai on H27/11/22.
// Copyright © 平成27年 EasyStyle G.K. All rights reserved.
//
public protocol NotificationObservable : AnyObject {
}
extension NotificationObservable {
/// Observe an named notification. When the named notifica... |
Fix UIView Rotation Degrees TODO | //
// LayerView.swift
// BFWControls
//
// Created by Tom Brodhurst-Hill on 9/01/2016.
// Copyright © 2016 BareFeetWare.
// Free to use at your own risk, with acknowledgement to BareFeetWare.
//
import UIKit
extension UIView {
var rotationDegrees: CGFloat {
get {
// TODO: Reverse eng... | //
// LayerView.swift
// BFWControls
//
// Created by Tom Brodhurst-Hill on 9/01/2016.
// Copyright © 2016 BareFeetWare.
// Free to use at your own risk, with acknowledgement to BareFeetWare.
//
import UIKit
extension UIView {
var rotationDegrees: CGFloat {
get {
let angleInRadians =... |
Set the title to the ContactsVC | //
// ContactsViewController.swift
// V
//
// Created by Dulio Denis on 7/5/16.
// Copyright © 2016 Dulio Denis. All rights reserved.
//
import UIKit
import CoreData
import Contacts
import ContactsUI
class ContactsViewController: UIViewController, ContextViewController {
// in order to fulfill the ContextVC ... | //
// ContactsViewController.swift
// V
//
// Created by Dulio Denis on 7/5/16.
// Copyright © 2016 Dulio Denis. All rights reserved.
//
import UIKit
import CoreData
import Contacts
import ContactsUI
class ContactsViewController: UIViewController, ContextViewController {
// in order to fulfill the ContextVC ... |
Disable timing-sensitive test that's periodically failing in CI, rdar://38378503. | // RUN: %target-typecheck-verify-swift -solver-expression-time-threshold=1
// REQUIRES: tools-release,no_asserts
// expected-no-diagnostics
let a: [Double] = []
_ = a.map { $0 - 1.0 }
.map { $0 * $0 }
.reduce(0, +) / Double(a.count)
| // RUN: %target-typecheck-verify-swift -solver-expression-time-threshold=1
// REQUIRES: tools-release,no_asserts
// REQUIRES: rdar38378503
// expected-no-diagnostics
let a: [Double] = []
_ = a.map { $0 - 1.0 }
.map { $0 * $0 }
.reduce(0, +) / Double(a.count)
|
Migrate typealias to associatedtype due to typealias deprecation | //
// Paging.swift
// GeneratedResults
//
// Created by Marcin Krzyzanowski on 22/06/15.
// Copyright (c) 2015 Marcin Krzyżanowski. All rights reserved.
//
import Foundation
//MARK: Generator
protocol AsyncGeneratorType {
typealias Element
typealias Fetch
mutating func next(fetchNextBatch: Fetch, onF... | //
// Paging.swift
// GeneratedResults
//
// Created by Marcin Krzyzanowski on 22/06/15.
// Copyright (c) 2015 Marcin Krzyżanowski. All rights reserved.
//
import Foundation
//MARK: Generator
protocol AsyncGeneratorType {
associatedtype Element
associatedtype Fetch
mutating func next(fetchNextBatch: ... |
Change Swift TSan test to use pthreads rather than GCD. | // main.swift
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUT... | // main.swift
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUT... |
Fix a memory leak issue | import UIKit
/// Converts a generic element to `NSAttributedString`. Should only be used if a specific converter is not found.
///
class GenericElementConverter: ElementConverter {
let serializer: AttributedStringSerializer
init(using serializer: AttributedStringSerializer) {
self.serialize... | import UIKit
/// Converts a generic element to `NSAttributedString`. Should only be used if a specific converter is not found.
///
class GenericElementConverter: ElementConverter {
unowned let serializer: AttributedStringSerializer
init(using serializer: AttributedStringSerializer) {
self.s... |
Fix parsing of push payloads | //
// PushPayload.swift
// Ello
//
// Created by Gordon Fontenot on 5/20/15.
// Copyright (c) 2015 Ello. All rights reserved.
//
public struct PushPayload {
let info: [String: AnyObject]
}
public extension PushPayload {
var applicationTarget: String {
return info["application_target"] as? String ?... | //
// PushPayload.swift
// Ello
//
// Created by Gordon Fontenot on 5/20/15.
// Copyright (c) 2015 Ello. All rights reserved.
//
public struct PushPayload {
let info: [String: AnyObject]
}
public extension PushPayload {
var applicationTarget: String {
return info["application_target"] as? String ?... |
Add helper method to detect if video is a WP shortcode. | import Foundation
import Aztec
// MARK: - VideoAttachment
//
extension VideoAttachment {
@objc var videoPressID: String? {
get {
return extraAttributes[VideoShortcodeProcessor.videoPressHTMLAttribute]?.toString()
}
set {
if let nonNilValue = newValue {
... | import Foundation
import Aztec
// MARK: - VideoAttachment
//
extension VideoAttachment {
@objc var videoPressID: String? {
get {
return extraAttributes[VideoShortcodeProcessor.videoPressHTMLAttribute]?.toString()
}
set {
if let nonNilValue = newValue {
... |
Make rounded border button public | //
// RoundedBorderButton.swift
// Swiftlier
//
// Created by Andrew J Wagner on 5/29/16.
// Copyright © 2016 Drewag LLC. All rights reserved.
//
#if os(iOS)
import UIKit
@IBDesignable class RoundedBorderButton: UIButton {
@IBInspectable var borderColor: UIColor = UIColor.clear {
didSet {
... | //
// RoundedBorderButton.swift
// Swiftlier
//
// Created by Andrew J Wagner on 5/29/16.
// Copyright © 2016 Drewag LLC. All rights reserved.
//
#if os(iOS)
import UIKit
@IBDesignable
public class RoundedBorderButton: UIButton {
@IBInspectable
public var borderColor: UIColor = UIColor.clear {
d... |
Update dependency SwiftyBeaver/SwiftyBeaver to from: "1.9.4" | // swift-tools-version:5.0
import PackageDescription
let package = Package(
name: "Conductor",
products: [
.executable(
name: "Conductor",
targets: ["Conductor"]
),
],
dependencies: [
.package(url: "https://github.com/danger/swift.git", from: "3.10.1"),
... | // swift-tools-version:5.0
import PackageDescription
let package = Package(
name: "Conductor",
products: [
.executable(
name: "Conductor",
targets: ["Conductor"]
),
],
dependencies: [
.package(url: "https://github.com/danger/swift.git", from: "3.10.1"),
... |
Update Multiset to Swift 4.2 | //: Playground - noun: a place where people can play
#if swift(>=4.0)
print("Hello, Swift 4!")
#endif
import Cocoa
var set = Multiset<String>()
set.add("Foo")
set.add("Foo")
set.add("Bar")
set.add("Baz")
set.count
set.count(for: "Foo")
set.allItems
var set2 = Multiset<String>()
set2.add("Foo")
set2.add("Foo")
... | //: Playground - noun: a place where people can play
import Cocoa
var set = Multiset<String>()
set.add("Foo")
set.add("Foo")
set.add("Bar")
set.add("Baz")
set.count
set.count(for: "Foo")
set.allItems
var set2 = Multiset<String>()
set2.add("Foo")
set2.add("Foo")
set2.isSubSet(of: set) // true
set.isSubSet(of: set... |
Fix broken test on Linux | // RUN: %target-typecheck-verify-swift -enable-objc-interop -import-objc-header %S/Inputs/diag_ownership_incompatibility.h
class C {
weak var weakVar: NoWeakClass? = nil // expected-error {{'NoWeakClass' is incompatible with 'weak' references}}
unowned var unownedVar = NoWeakClass() // expected-error {{'NoWeakClas... | // REQUIRES: objc_interop
// RUN: %target-typecheck-verify-swift -enable-objc-interop -import-objc-header %S/Inputs/diag_ownership_incompatibility.h
class C {
weak var weakVar: NoWeakClass? = nil // expected-error {{'NoWeakClass' is incompatible with 'weak' references}}
unowned var unownedVar = NoWeakClass() // e... |
Remove value(forKeyPath:) method call because is not supported by Linux | //
// CliArgsParser.swift
// Danger
//
// Created by Franco Meloni on 12/11/2018.
//
import Foundation
public final class CliArgsParser {
public init() {}
public func parseCli(fromData data: Data) -> CliArgs? {
if let dictionary = try? JSONSerialization.jsonObject(with: data, options: .allowFr... | //
// CliArgsParser.swift
// Danger
//
// Created by Franco Meloni on 12/11/2018.
//
import Foundation
public final class CliArgsParser {
public init() {}
public func parseCli(fromData data: Data) -> CliArgs? {
if let dictionary = try? JSONSerialization.jsonObject(with: data, options: .allowFr... |
Fix the gates on a test that needs statistics | // REQUIRES: rdar61348443
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-module -module-name Multi -o %t/multi-file.swiftmodule -primary-file %s %S/Inputs/multi-file-type-eraser.swift
// RUN: %target-swift-frontend -emit-module -module-name Multi -o %t/multi-file-2.swiftmodule %s -primary-file %S/Inp... | // REQUIRES: asserts
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-module -module-name Multi -o %t/multi-file.swiftmodule -primary-file %s %S/Inputs/multi-file-type-eraser.swift
// RUN: %target-swift-frontend -emit-module -module-name Multi -o %t/multi-file-2.swiftmodule %s -primary-file %S/Inputs/m... |
Add decode extension for Array | //
// Decodable.swift
// Decodable
//
// Created by Johannes Lund on 2015-07-07.
// Copyright © 2015 anviking. All rights reserved.
//
import Foundation
public protocol Decodable {
static func decode(json: AnyObject) throws -> Self
}
public protocol Castable: Decodable {}
extension Castable {
public sta... | //
// Decodable.swift
// Decodable
//
// Created by Johannes Lund on 2015-07-07.
// Copyright © 2015 anviking. All rights reserved.
//
import Foundation
public protocol Decodable {
static func decode(json: AnyObject) throws -> Self
}
public protocol Castable: Decodable {}
extension Castable {
public sta... |
Remove printing a warning to console because we have a stable feature. | //
// TextInputFormats+BankCardNumber.swift
// TextInputKit
//
// Created by Artem Starosvetskiy on 25/11/2016.
// Copyright © 2016 Artem Starosvetskiy. All rights reserved.
//
public extension TextInputFormats {
static func bankCardNumber(_ options: BankCardNumberTextInputOptions = .options()) -> TextInputFo... | //
// TextInputFormats+BankCardNumber.swift
// TextInputKit
//
// Created by Artem Starosvetskiy on 25/11/2016.
// Copyright © 2016 Artem Starosvetskiy. All rights reserved.
//
public extension TextInputFormats {
static func bankCardNumber(_ options: BankCardNumberTextInputOptions = .options()) -> TextInputFo... |
Return error to the error closure | //
// PHLoadPostOperation.swift
// Product Hunt
//
// Created by Vlado on 5/3/16.
// Copyright © 2016 ProductHunt. All rights reserved.
//
import Foundation
import ReSwift
class PHLoadPostOperation {
class func performNewer(store: Store<PHAppState>? = store) {
guard let store = store else {
... | //
// PHLoadPostOperation.swift
// Product Hunt
//
// Created by Vlado on 5/3/16.
// Copyright © 2016 ProductHunt. All rights reserved.
//
import Foundation
import ReSwift
class PHLoadPostOperation {
class func performNewer(store: Store<PHAppState>? = store) {
guard let store = store else {
... |
Mark this test as depending on ObjC bridging specifics. | // RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s
public struct Q<T> {
let x: T
}
public func foo<T>(arg: [Q<T>]) {
// CHECK: define {{.*}}_TF12generic_arg43foourFGSaGVS_1Qx__T_
// CHECK: store %[[TY:.*]]* %0, %[[TY]]** %[[ALLOCA:.*]], align
// CHECK: call void @llvm.dbg.declare(metadata %[[TY]]... | // RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s
// REQUIRES: objc_interop
public struct Q<T> {
let x: T
}
public func foo<T>(arg: [Q<T>]) {
// CHECK: define {{.*}}_TF12generic_arg43foourFGSaGVS_1Qx__T_
// CHECK: store %[[TY:.*]]* %0, %[[TY]]** %[[ALLOCA:.*]], align
// CHECK: call void @llvm.db... |
Move left bar button items over a bit | //
// UINavigationItem.swift
// Ello
//
// Created by Colin Gray on 3/20/2015.
// Copyright (c) 2015 Ello. All rights reserved.
//
import Foundation
extension UINavigationItem {
func fixNavBarItemPadding() {
let negativeSpacer = UIBarButtonItem(barButtonSystemItem: .FixedSpace, target: nil, action: n... | //
// UINavigationItem.swift
// Ello
//
// Created by Colin Gray on 3/20/2015.
// Copyright (c) 2015 Ello. All rights reserved.
//
import Foundation
extension UINavigationItem {
func fixNavBarItemPadding() {
let negativeSpacer = UIBarButtonItem(barButtonSystemItem: .FixedSpace, target: nil, action: n... |
Undo the XFAIL of this test | // RUN: not --crash %target-swift-frontend %s -typecheck
// See <rdar://32555384>
// XFAIL: *
protocol P {}
func bar(p: P?) {
foo(p is String)
}
func foo<T>(_: T, _: T) {}
func foo<T>(_: T?, _: T?) {}
| // RUN: not --crash %target-swift-frontend %s -typecheck
protocol P {}
func bar(p: P?) {
foo(p is String)
}
func foo<T>(_: T, _: T) {}
func foo<T>(_: T?, _: T?) {}
|
Remove a redundant parameter for UIApplication | //
// Copyright © 2015 Onefootball GmbH. All rights reserved.
//
import UIKit
#if DEBUG
autoreleasepool {
if Process.arguments.contains("--ResetData") {
ApplicationResetManager.reset()
}
}
#endif
autoreleasepool {
UIApplicationMain(Process.argc, Process.unsafeArgv, NSStringFromClass(UIApplicatio... | //
// Copyright © 2015 Onefootball GmbH. All rights reserved.
//
import UIKit
#if DEBUG
autoreleasepool {
if Process.arguments.contains("--ResetData") {
ApplicationResetManager.reset()
}
}
#endif
autoreleasepool {
UIApplicationMain(Process.argc, Process.unsafeArgv, nil, NSStringFromClass(AppDele... |
Use a functional approach for character reading | class EntryReader {
static let lineLength = 27
class func read(_ lines: [String]) -> String? {
guard lines.count == 4 else {
return nil
}
return characters(in: lines)
}
private class func characters(in lines: [String]) -> String {
var output = ""
for i in characterStride() {
... | class EntryReader {
static let lineLength = 27
class func read(_ lines: [String]) -> String? {
guard lines.count == 4 else {
return nil
}
return characters(in: lines)
}
private class func characters(in lines: [String]) -> String {
return characterStride().reduce("") { output, i in
... |
Add missing JFIF format enum case. | public enum TextureFormat : UInt32 {
/* DirectX standard formats */
case D3DFMT_R8G8B8 = 20 // RGB888
case D3DFMT_A8R8G8B8 = 21 // ARGB888
case D3DFMT_R5G6B5 = 23 // RGB565
case D3DFMT_A4R4G4B4 = 26 // ARGB4444
case D3DFMT_P8 = 41 // 8-bit index
case D3DFMT_DXT1 = 0x3... | public enum TextureFormat : UInt32 {
/* DirectX standard formats */
case D3DFMT_R8G8B8 = 20 // RGB888
case D3DFMT_A8R8G8B8 = 21 // ARGB888
case D3DFMT_R5G6B5 = 23 // RGB565
case D3DFMT_A4R4G4B4 = 26 // ARGB4444
case D3DFMT_P8 = 41 // 8-bit index
... |
Add border color name to collection view cell | /*
| _ ____ ____ _
| | |‾| ⚈ |-| ⚈ |‾| |
| | | ‾‾‾‾| |‾‾‾‾ | |
| ‾ ‾ ‾
*/
import UIKit
@IBDesignable open class CustomCollectionCell: UICollectionViewCell, BackgroundColorNameable, TintColorNameable {
// MARK: - Inspectable properties
@IBInspectable open var background... | /*
| _ ____ ____ _
| | |‾| ⚈ |-| ⚈ |‾| |
| | | ‾‾‾‾| |‾‾‾‾ | |
| ‾ ‾ ‾
*/
import UIKit
@IBDesignable open class CustomCollectionCell: UICollectionViewCell, BackgroundColorNameable, TintColorNameable, BorderColorNameable {
// MARK: - Inspectable properties
@IBInspectabl... |
Use SF Symbols for recents cell button, make it a bit larger | import AppKit
class RecentsCellView: NSTableCellView {
@IBOutlet weak var downloadDateTextField: NSTextField!
@IBOutlet weak var downloadAgainButton: NSButton!
}
| import AppKit
class RecentsCellView: NSTableCellView {
@IBOutlet weak var downloadDateTextField: NSTextField!
@IBOutlet weak var downloadAgainButton: NSButton!
override func awakeFromNib() {
super.awakeFromNib()
if #available(OSX 11.0, *) {
downloadAgainButton.image = NSImage(
syst... |
Adjust default nib extension to use the bundle of the type | //
// UIView+Nib.swift
// iExtra
//
// Created by Daniel Saidi on 2016-11-09.
// Copyright © 2018 Daniel Saidi. All rights reserved.
//
import UIKit
public extension UIView {
// MARK: - Properties
public static var defaultNib: UINib {
return UINib(nibName: defaultNibName, bundle: n... | //
// UIView+Nib.swift
// iExtra
//
// Created by Daniel Saidi on 2016-11-09.
// Copyright © 2018 Daniel Saidi. All rights reserved.
//
import UIKit
public extension UIView {
// MARK: - Properties
public static var defaultNib: UINib {
return defaultNib(in: Bundle(for: self))
}
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.